I am trying to run my first django application, but I ran 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 sync, transfer or create a file upuperuser
I am setting the DATABASES variable as follows:
DATABASES = {'default' : dj_database_url.config(default=os.environ["HEROKU_POSTGRESQL_OLIVE_URL"]) }
Is there anything else I need to configure, or am I mistaken?
EDIT (SOLVES):
Thanks for helping me narrow down the problem, I found a solution.
Since this was the first time I turned to Herok, and the first time I used two django directories for scoops. I thought something like
python manage.py syncdb
instead, my settings folder looked like
.../settings base.py local.py production.py demo.py # ...
I need to do
python manage.py syncdb --app.settings.demo
python django heroku
Derek
source share