python - Postgres localhost issue on Heroku Django application -



python - Postgres localhost issue on Heroku Django application -

i cannot life of me figured out. whenever seek , run database migration (currently using south django 1.6.5), error:

conn = _connect(dsn, connection_factory=connection_factory, async=async) django.db.utils.operationalerror: not connect server: connection refused server running on host "localhost" (127.0.0.1) , accepting tcp/ip connections on port 5432?

i've tried every settings config can think of. have base, local, , production settings file. in production settings file i've copied database dictionary values it's info page on heroku's website ensure 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 i'm telling localhost.

have checked application create sure database_url set? should point database you're trying utilize (heroku_postgresql_color_url of sorts). then, utilize dj_database_url.config() @rajasimon mentioned. see here https://devcenter.heroku.com/articles/getting-started-with-python#provision-a-database

python django postgresql heroku

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -