[Fixed]-Heroku/Django: No module named dj_database_url

45👍

You don’t give a lot of information about exactly where you are trying to run your sync db? Locally? Or up on Heroku? My answer is going to assume that it’s locally.

Basically, you need to have virtualenv install and pip. While working in your virtualenv (with it activated), you need to do a

 pip install dj-database-url

Then you need to do a:

 pip freeze > requirements.txt

Getting up and going on Python+Django+Heroku is not a really hard thing to do… but, there are quite a few steps. If you are fuzzy, I recommend the Heroku Django tutorial.

2👍

You have to install dj-database-url.

Add it to your requirements.txt file.

Leave a comment