About Default DJANGO_SETTINGS_MODULE
If you use multiple Django project settings files for different environments (dev, test, staging, production), then better remove the following line from manage.py
, wsgi.py
, and asgi.py
:
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'demo.settings')
This will force you to always set the DJANGO_SETTINGS_MODULE
environment variable or a custom --settings
parameter and will save you from unwanted behavior (like migrating a wrong database) when you mismatch the environments.
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You