I cannot for the life of me figured this out. Whenever I try and run a database migration (currently using South for Django 1.6.5), I get this error:
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
I've tried every settings config that I can think of. I have a base, local, and production settings file. In my production settings file I've even copied the database dictionary values from it's info page on heroku's website to ensure that they match. ex)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'd3...k',
'USER': 'yvg...f',
'PASSWORD': '...',
'HOST': '....amazonaws.com',
'PORT': '5432',
}
}
I don't see ANYWHERE that I'm telling it to look for localhost.
DATABASES['???'] = dj_database_url.config()
? – Raja Simon Oct 14 '14 at 5:24default
..? – Raja Simon Oct 14 '14 at 13:46