Need an example and please explain me the purpose of python-dotenv.
I am kind of confused with the documentation.
In addition to @Will's answer, the python-dotenv module comes with a find_dotenv() that will try to find the .env file.
# settings.py
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
SECRET_KEY = os.environ.get("SECRET_KEY")
DATABASE_PASSWORD = os.environ.get("DATABASE_PASSWORD")