I am trying to create my own kind of project structure by looking at two scoops of django. The project structure looks something like this
.envs
.local
.django .postgres.production
.django .postgresin postgres inside local, the following items are listed
POSTGRES_HOST=postgresPOSTGRES_PORT=5432POSTGRES_DB=marketingPOSTGRES_USER=usernamePOSTGRES_PASSWORD=passwordDATABASE_URL=postgres://username:password@localhost:5432/marketingthe settings file is divided into 3 parts as base.py, local.py and production.py
in base.py, I have configured the DATABASES key as following
DATABASES = {'default': env.db('DATABASE_URL'),}However I am getting an error
django.core.exceptions.ImproperlyConfigured: Set the DATABASE_URL environment variable
Though, I have DATABASE_URL in .envs/.local/.postgres, I am getting above error. Why is that so?