You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This way, the extension object is not initially bound to the app, and one extension object could be used for multiple apps.
However, when this pattern is used with Flask-Talisman, the Talisman constructor (i.e. Talisman.__init__), requires that a Flask app object is passed, otherwise the kwargs are ignored (https://github.com/GoogleCloudPlatform/flask-talisman/blob/master/flask_talisman/talisman.py#L57). I'm just curious, is there a particular reason for this design? If not, I would be happy to submit a PR to modify this behavior.
The text was updated successfully, but these errors were encountered:
A common Flask application extension pattern is to first create the extension object, e.g.:
and then register it with the Flask app in an application factory, e.g.:
This way, the extension object is not initially bound to the app, and one extension object could be used for multiple apps.
However, when this pattern is used with Flask-Talisman, the Talisman constructor (i.e.
Talisman.__init__
), requires that aFlask
app object is passed, otherwise the kwargs are ignored (https://github.com/GoogleCloudPlatform/flask-talisman/blob/master/flask_talisman/talisman.py#L57). I'm just curious, is there a particular reason for this design? If not, I would be happy to submit a PR to modify this behavior.The text was updated successfully, but these errors were encountered: