In Django, Because when in development and production mode, the settings.py file has to be so much different
For example
Development:
DEBUG = true
...
ALLOWED_HOSTS = []
...
EMAIL_PAGE_DOMAIN = 'http://127.0.0.1:8000'
Production:
DEBUG = false
...
ALLOWED_HOSTS = ['example.com']
...
EMAIL_PAGE_DOMAIN = 'https://example.com'
I don't know if there is a condition to check if the app is in development mode or production mode so that I don't hard-code it. The code should change automatically based on its mode. I imagine something like this
if in_Development_Mode() == true:
#code for devopmenet
else:
#code for production