1

Install python-dotenv

pip install python-dotenv

This package will take care of our environment variables.

Quick explanation:

Environment variables change based on the environment in which we're running our Django project (production, development...). 

Examples:

DEBUG; this variable should be False in production, and True in our local environment.

This is why we're going to create a separate file called (.env) that will hold our DEBUG variable. The file won't be staged to version control. Then we're going to create the .env file manually in our production environment, it will also hold our debug variable but with a different value.

826
Mohamed
El Firdoussi