python - Django don't see dj_database_url -


i want deploy django app on heroku. when try sync db localy error message:

importerror: not import settings 'aplikacjakz.settings' (is on sys.path?): no    module named dj_database_url 

i installed dj database url. requirements file:

    django==1.5.1     argparse==1.2.1     distribute==0.6.34     dj-database-url==0.2.2     dj-static==0.0.5     django-toolbelt==0.0.1     gunicorn==17.5     psycopg2==2.5.1     static==0.4     wsgiref==0.1.2 

this settings:

databases = {'default':  dj_database_url.config(default='postgres://localhost')}  databases = {     'default': {         'engine': 'django.db.backends.sqlite3',          'name': '/var/db/appkz',                 'user': '',         'password': '',         'host': '',                               'port': '',                  } } 

heroku has been kind enough explain process in details here https://devcenter.heroku.com/articles/getting-started-with-django

from error, seems dj database url not on system path,

here somethings should out for

  1. install dependencies in requirements.txt file using

    pip install -r requirements.text

  2. double check have activated venv. can running

    venv/scripts/activate.bat # assuming "venv" name of virtual environment


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -