feat(djinit/templates/config): make DJANGO_SETTINGS_MODULE configurable with project name

New Features
- Replace hardcoded `core.settings.production` with templated `{{ project_name }}.settings.production` in both ASGI and WSGI config templates, enabling per‑project settings customization.

Enhancements
- Increase template flexibility for project‑specific configuration without manual edits.

Bug Fixes
- None
This commit is contained in:
sankalp committed 2026-01-30 23:29:53 +05:45
1 parent 0cffc3926d
commit e5a49f1a89
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -7,5 +7,5 @@ from django.core.asgi import get_asgi_application
env = environ.Env()
environ.Env.read_env()
os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="core.settings.production"))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="{{ project_name }}.settings.production"))
application = get_asgi_application()
+1 -1
View File
@@ -7,6 +7,6 @@ from django.core.wsgi import get_wsgi_application
env = environ.Env()
environ.Env.read_env()
os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="core.settings.production"))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="{{ project_name }}.settings.production"))
application = get_wsgi_application()