Skip to content
Myr

Added the extensions dictionary on the application

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent eb67242 · Browse files · 1 file+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−0 removed

  • other:+16 added−0 removed

1 file+16 added−0 removed

modified:flask/app.py+16 added
254 unmodified lines
255 #:256 #: .. versionadded:: 0.5257 self.modules = {}258259 #: a place where extensions can store application specific state. For260 #: example this is where an extension could store database engines and261 #: similar things. For backwards compatibility extensions should register262 #: themselves like this::263 #:264 #: if not hasattr(app, 'extensions'):265 #: app.extensions = {}266 #: app.extensions['extensionname'] = SomeObject()267 #:268 #: The key must match the name of the `flaskext` module. For example in269 #: case of a "Flask-Foo" extension in `flaskext.foo`, the key would be270 #: ``'foo'``.271 #:272 #: .. versionadded:: 0.7273 self.extensions = {}274275 #: The :class:`~werkzeug.routing.Map` for this instance. You can use276 #: this to change the routing converters after the class was created277 #: but before any routes are connected. Example::278 #:
633 unmodified lines