I want to run the flask tutorial on pythonanywhere, but I don't know how to configure wsgi to work with the app structure of the tutorial. Unlike most flask apps the tutorial doesn't create an app on the module level, but it creates the app in a function called create_app
.
The flask tutorial has a simple deployment with waitress where you can call a function directly like this:
waitress-serve --call 'flaskr:create_app'
Unfortunately I know next to nothing about wsgi. Could somebody tell me, how I achieve the same with the configuration in pythonanywhere wsgi configuration file?
At the moment I get the following error message in the error.log
:
2018-05-31 10:10:48,471: Error running WSGI application
2018-05-31 10:10:48,471: TypeError: 'NoneType' object is not iterable