possibly a little out my depth here, I\'ve read the heroku docs thoroughly and still don\'t quite understand how the Procfile should be set up. Trying to deploy heroku (
try updating your Procfile to read as:
web: gunicorn grad.wsgi --log-file - --log-level debug --preload --workers 1
I have a few Heroku-Django apps that works with a similar setup. Let me know if it works for you?
You correctly identified that the key line in the error message is the ModuleNotFoundError
.
2020-01-27T11:39:57.599554+00:00 app[web.1]: ModuleNotFoundError: No module named 'grad'
The problem is that your Django project directory (the one containing manage.py
) isn't in the project root, it's in the gpproject
directory.
Therefore you need to add that directory to the Python path with the --python
flag, so that the grad
module inside it can be imported.
web: gunicorn grad.wsgi:application --python gpproject --log-file - --log-level debug --preload --workers 1