5👍
✅
Have you set your DJANGO_SETTINGS_MODULE environment variable? I believe what is happening is this: by default Django is using your local.py
settings, which is why it’s trying to connect on localhost.
To make Django detect and use your production.py
settings, you need to do the following:
heroku config:set DJANGO_SETTINGS_MODULE=settings.production
This will make Django load your production.py settings when you’re on Heroku 🙂
Source:stackexchange.com