I came across the same question, but apparently for various reasons. Heroku docs at https://devcenter.heroku.com/articles/django#prerequisites say what to add to settings.py :
following:
DATABASES['default'] = dj_database_url.config()
You can pass a parameter:
DATABASES['default'] = dj_database_url.config(default='postgres://user: pass@localhost /dbname')
And this will allow you to develop locally and on Heroku. The part that REALLY SOLVES the problem I had was that the Heroku DATABASE_URL configuration environment variable was not actually set. To install this, I ran
$ heroku config
I saw the database URL assigned to a separate configuration variable. So I created a new variable:
$ heroko config:add DATABASE_URL={
This solved my problem. Hope this helps someone else with similar issues.
sethammons
source share