https://static.djangoproject.com/img/logos/django-logo-negative.png

How to configure Environment Specific settings in Python Django Framework?

There are certain configurations in your settings.py such as DEBUG, STATIC_URL, DATABASES, SECRET_KEY, ALLOWED_HOSTS, etc. These settings are actually the ones that you need to look after while deploying to the production environment. Whenever your application goes live, you shouldn’t display your debug logs, or error messages on the browsers. This will make your application vulnerable. Also you might want to put different secret keys.
For these reasons, we need environment-specific settings. In this tutorial, I will be creating different settings for local, development, and production environment.