wsgi is particular about the app object
This commit is contained in:
parent
fec9d660c3
commit
dfbf1de5a1
3 changed files with 4 additions and 4 deletions
|
@ -165,10 +165,10 @@ def create_app():
|
||||||
add_routes(app)
|
add_routes(app)
|
||||||
add_template_filters(app)
|
add_template_filters(app)
|
||||||
|
|
||||||
return app_manager
|
return app, app_manager
|
||||||
|
|
||||||
|
|
||||||
# For usage when you directly call the script with python
|
# For usage when you directly call the script with python
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app_mgr = create_app()
|
app, app_mgr = create_app()
|
||||||
app_mgr.run()
|
app_mgr.run()
|
||||||
|
|
|
@ -4,7 +4,7 @@ import add_admins
|
||||||
|
|
||||||
from app import create_app, db
|
from app import create_app, db
|
||||||
|
|
||||||
app_manager = create_app()
|
app, app_manager = create_app()
|
||||||
|
|
||||||
entry_sets = {
|
entry_sets = {
|
||||||
"admins": add_admins.add,
|
"admins": add_admins.add,
|
||||||
|
|
|
@ -20,7 +20,7 @@ sys.path.append(os.getcwd())
|
||||||
# and the WSGI object to be called `application`
|
# and the WSGI object to be called `application`
|
||||||
from app import create_app
|
from app import create_app
|
||||||
|
|
||||||
application = create_app()
|
application, appmgr = create_app()
|
||||||
|
|
||||||
# For running on the server with passenger etc
|
# For running on the server with passenger etc
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue