4 ms·
Extensions can register themselves with the Flask application object, so you can look there: current_app.extensions['whatever']. However, it is not specified wh
by keosak 9y ago
Extensions can register themselves with the Flask application object, so you can look there: current_app.extensions['whatever']. However, it is not specified what exactly this dictionary contains, so eg. SQLAlchemy puts a custom State class there. You can still get the extension object out of it, it's just that there is no common convention.
http://flask.pocoo.org/docs/0.12/api/#flask.Flask.extensions http://flask.pocoo.org/docs/0.12/api/#flask.Flask.extensions
https://github.com/mitsuhiko/flask-sqlalchemy/blob/master/flask_sqlalchemy/__init__.py#L608 https://github.com/mitsuhiko/flask-sqlalchemy/blob/master/fl...