[Fixed]-How to run Django project locally for Heroku

1👍

There are two problems here. The first is Django-related:

ImportError: No module named team-app.wsgi

Your wsgi.py file is located in the users_groups/ directory so your Procfile should reference users_groups.wsgi:

web: gunicorn users_groups.wsgi --log-file -

The name of the top-level directory that contains the entire project is irrelevant.

The second problem is Heroku-related. Heroku expects the Django directory to be the root of your repository. Moving Procfile into src/, then running heroku local web should get you up and running locally.

When you deploy to Heroku you’ll have to make sure your current src/ directory is your root directory. That may mean moving some files into src/ and recreating / refactoring your Git repository there, or it could mean moving everything that’s currently in src/ up a level.

👤Chris

Leave a comment