Fix .env file reading

In order to properly read `.env` file, the below line has to be added:
`environ.Env.read_env()`
This commit is contained in:
Praneeth Karnena 2020-10-10 13:59:34 +05:30 committed by GitHub
parent 53a112b6e4
commit 9efe69465f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# {{ cookiecutter.project_slug }}/
APPS_DIR = ROOT_DIR / "{{ cookiecutter.project_slug }}"
env = environ.Env()
environ.Env.read_env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
if READ_DOT_ENV_FILE: