When executing heroku run python manage.py syncdb on a django app I recently deployed to heroku, i get the following error:
raise ImproperlyConfigured("You need to specify NAME in your Django settings file.")
I understand what the error means. I’m just not sure why its occurring. I am pretty much following the current heroku deployment guidelines to a tee.
I have dj_database_url==0.2.1 and pycopg2==2.4.4 in my requirements.txt. I set up my app with heroku-postgresql:crane. In my settings.py, I have:
import dj_database_url
DATABASES = {'default': dj_database_url.config(default='postgres://localhost')}
The weird thing is, I already have 3 successful deployments on Heroku of this same repo, so its not like I’m starting from scratch here.
I figured this out. I needed to run
This part is conspicuously absent from the tutorial, and I remember having to hunt for this last time I did this.