I already have a Mezzanine app deployed on Heroku. The system ran OK before, but today the web page showed an error message Internal Server Error
. Checked with heroku logs
and found that the command web python manage.py run_gunicorn -b 0.0.0.0:$PORT -w 1
is deprecated and Heroku suggests using <projName>.wsgi:application
.
But Mezzanine currently has different project layout from Django (Mezzanine's settings.py
is in the project root directory), so I tried the following in Procfile
:
web: gunicorn wsgi --log-file -
However, such a setting results in error message:
ImportError: No module named 'app'
...
ImportError: Could not import settings 'app.settings' (Is it on sys.path? Is there an import error in the settings file?) No module named 'app'.
Then I tried:
web: gunicorn <projName>.wsgi --log-file -
The error message (of course ;-):
ImportError: No module named '<projName>'
So, how do I set Procfile
so that gunicorn is able to find the project's settings.py
and wsgi.py
?