I am trying to get my first django app up, but I'm running into this db error:
OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
This happens whenever I try to syncdb, migrate, or createsuperuser
I am configuring my DATABASES variable like:
DATABASES = {'default' : dj_database_url.config(default=os.environ["HEROKU_POSTGRESQL_OLIVE_URL"]) }
Is there something else I need to configure or am doing wrong?
EDIT (SOLVED):
Thanks for helping me narrow down the problem, I've found the solution.
Since this was the first time I deployed to heroku and the first time I used the two scoops django directory format. I thought doing something like
python manage.py syncdb # would be okay
instead beause my settings folder looks like
.../settings
base.py
local.py
production.py
demo.py
# ...
I need to do
python manage.py syncdb --app.settings.demo