python - db.sqlite3, ,settings.py for heroku -
databases['default'] = dj_database_url.config() nameerror: name 'databases' not defined
i'm getting error while doing heroku run python manage.py syncdb command.
initially wrote
databases = { 'default': dj_database_url.config() }
but getting error
file "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 20, in <module> raise improperlyconfigured("error loading psycopg2 module: %s" % e) django.core.exceptions.improperlyconfigured: error loading psycopg2 module: no module named psycopg2
what correct syntax sqlite3 database.
i don't know why asking sqlite databases. code have given postres, correct, can't use sqlite on heroku.
the error getting appears because haven't included psycopg2
in requirements.txt file.
Comments
Post a Comment