I’m trying to deploy a Django site on the app platform. It keeps failing with:
ModuleNotFoundError: No module named 'thesite.wsgi'
I started the project with
django-admin startproject thesite
My run command for the app is
gunicorn --worker-tmp-dir /dev/shm thesite.wsgi
And if I run that command from the project root (the same location as
manage.py) on my local machine, everything works.
Any thoughts? I suspect that this is something related to the context where the gunicorn command is running, but I can’t figure out how to get a shell in the same VM/container/whatever that the app is hosted in.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.