2👍
✅
From your comment in the question above, I’m assuming that you’re trying to set up Django in a Heroku instance.
If you’re using Heroku’s starter template, you’re going to see an overwrite to the DATABASES variable. This is because Heroku uses the library dj_database_url to get the environment path of the database that was deployed with your Heroku app. So Django updates the default database to use it. This is relevant when you want to deploy your Django app to the Heroku instance.
In case you want to use your app in your local environment (your machine), you just need to comment those two lines:
# db_from_env = dj_database_url.config(conn_max_age=500)
# DATABASES['default'].update(db_from_env)
But remember to comment out those lines again when uploading your code to Heroku.
Source:stackexchange.com