Traditionally, I have configured the UWSGI configuration file to call an application like below:
mydirectory/uwsgi_application.ini
...
#python module to import
a
I am also using the flask-script
manager , so what i did was
created a wsgi.py
.which was like.
from app import *
application = create_app("development")
then uwsgi --wsgi-file wsgi.py --callable application
Note: the callable is the flask object name in the wsgi.py
.
You don't use Flask-Script with uWSGI. You point it at the app directly. Or in your case, you point it at a call to the app factory. The simplest example is:
uwsgi --module 'myapp:create_app()'