exHash
exHash

Reputation: 1265

deploying django to heroku

Hi Folks so I followed the guid to deploying django on heroku here

https://devcenter.heroku.com/articles/django

but my server keeps crashing on heroku with this error any thoughts or direction is greatly appreciated.

2013-02-12T19:27:40+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-  packages/django/utils/importlib.py", line 35, in import_module
2013-02-12T19:27:40+00:00 app[web.1]:     __import__(name)
2013-02-12T19:27:40+00:00 app[web.1]:   File "/app/eduudle/settings.py", line 15, in   <module>
2013-02-12T19:27:40+00:00 app[web.1]:     DATABASES = { 'default': {dj_database_url.config()}}
2013-02-12T19:27:40+00:00 app[web.1]: TypeError: unhashable type: 'dict'
2013-02-12T19:27:41+00:00 heroku[web.1]: Process exited with status 1
2013-02-12T19:27:41+00:00 heroku[web.1]: State changed from starting to crashed

Upvotes: 0

Views: 667

Answers (2)

exHash
exHash

Reputation: 1265

found the issue the document is dated so following what it has wont work based on this

https://github.com/heroku/heroku-buildpack-python/issues/45

What I had originally would have worked but i added too many curly brackets

So instead of

 DATABASES = { 'default': {dj_database_url.config()}}

use

 DATABASES = { 'default': dj_database_url.config()}

Upvotes: 1

dm03514
dm03514

Reputation: 55922

the docs suggest format for databases should be

DATABASES['default'] = dj_database_url.config()

not

DATABASES['default'] = {dj_database_url.config()}

Upvotes: 2

Related Questions