Skip to content
Myr

Added a missing module to import statement

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

authored by Ioan Vancea · committed by Ioan Vancea · parent 80b9453 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/patterns/deferredcallbacks.rst+1 added-1 removed
58 unmodified lines
59At any time during a request, we can register a function to be called at the60end of the request. For example you can remember the current language of the61user in a cookie in the before-request function::6263 from flask import request63 from flask import request, after_this_request6465 @app.before_request66 def detect_user_language():67 language = request.cookies.get('user_lang')
6 unmodified lines