fbone
fbone copied to clipboard
How to get app?
Hey!
Thanks for great layout it is really helpful! However I have one simple question - how to I actually access the app? It is created in manage.py and is not exported anywhere so when I need it somewhere, say in my models when I need app.config how do I get it?
do you mean accessing the current app in a module?
from flask import current_app as app
print(app.config)
this is part of flask http://flask.pocoo.org/docs/0.10/api/#useful-functions-and-classes