1👍
✅
You are over-writing the database with the values you get from dj_database_url
. That is pulled from the environment variable that Heroku injects, DATABASE_URL
. From your command line, run heroku config
to see what it’s set to – it will match what you see in your console session.
You can either 1) over-ride that variable (via heroku config:set
) or 2) create a new variable (also via heroku config:set
) and tell dj_database_url
to use that variable, via dj_database_url.config(env='MY_ENV_VAR')
.
Source:stackexchange.com