ldjango
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: ldjango | ||
| Version: 7.9 | ||
| Version: 8.0 | ||
| Summary: CLI tool for creating Django projects with a predefined structure. | ||
@@ -5,0 +5,0 @@ Author: Liaranda |
+1
-1
@@ -12,3 +12,3 @@ import os | ||
| version = '7.9' | ||
| version = '8.0' | ||
@@ -15,0 +15,0 @@ # Initialize colorama |
+6
-3
@@ -97,6 +97,9 @@ import os | ||
| middleware_pattern = 'MIDDLEWARE = [' | ||
| security_middleware = "'django.middleware.security.SecurityMiddleware'," | ||
| whitenoise_middleware = " 'whitenoise.middleware.WhiteNoiseMiddleware'," | ||
| if middleware_pattern in content and whitenoise_middleware not in content: | ||
| insert_index = content.find(middleware_pattern) + len(middleware_pattern) | ||
| return content[:insert_index] + f"\n{whitenoise_middleware}" + content[insert_index:] | ||
| security_index = content.find(security_middleware) | ||
| if security_index != -1: | ||
| insert_index = content.find('\n', security_index) + 1 | ||
| return content[:insert_index] + f"{whitenoise_middleware}\n" + content[insert_index:] | ||
| return content | ||
@@ -129,3 +132,3 @@ | ||
| if 'STATIC_URL' not in content: | ||
| content += static_settings | ||
| content = content.rstrip() + '\n\n' + static_settings | ||
| return content | ||
@@ -132,0 +135,0 @@ |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: ldjango | ||
| Version: 7.9 | ||
| Version: 8.0 | ||
| Summary: CLI tool for creating Django projects with a predefined structure. | ||
@@ -5,0 +5,0 @@ Author: Liaranda |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
66219
0.28%540
0.56%