Skip to content
Myr

Document example request_globals_class use cases.

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

authored by Ron DuPlain · committed by Ron DuPlain · parent 33bae1a · Browse files · 1 file+7 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+7 added−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:flask/app.py+7 added
148 unmodified lines
149 response_class = Response150151 #: The class that is used for the :data:`~flask.g` instance.152 #:153 #: Example use cases for a custom class:154 #:155 #: 1. Store arbitrary attributes on flask.g.156 #: 2. Add a property for lazy per-request database connectors.157 #: 3. Return None instead of AttributeError on expected attributes.158 #: 4. Raise exception if an unexpected attr is set, a "controlled" flask.g.159 #:160 #: .. versionadded:: 0.9161 request_globals_class = _RequestGlobals162163 #: The debug flag. Set this to `True` to enable debugging of the
1528 unmodified lines