I'm trying to upload my Django(v2.0) application to Google App Engine, but Gunicorn(v19.7.1) can't find my app. When I deploy my app using gcloud app deploy
I get error
'No Module Named AppFlex'
Full screenshot of the error and app.yaml config is below.
The contents of the wsgi.py are:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "AppFlex.settings")
application = get_wsgi_application()
Additionally, I can run the app locally using:
gunicorn AppFlex.wsgi --workers 16
Another screenshot where I can run the app using gunicorn locally :
I think the issue is that your top level module (
AppFlex
) is camel-cased, and for some reason App Engine expects only lower case module names.If you change your module name to
appflex
and update the corresponding configuration inapp.yaml
and everywhere else that your top level module is referenced (e.g., inwsgi.pi
) it should work.I am not too sure why App Engine is doing that, but it is convention for modules to be lower case, and I'd strongly suggest you follow that convention.