mirror of https://github.com/pallets/flask.git
Rename teardown example to avoid confusion.
This commit is contained in:
parent
2647bec408
commit
20bf8edcf4
|
@ -174,13 +174,14 @@ It's easy to see the behavior from the command line:
|
||||||
|
|
||||||
>>> app = Flask(__name__)
|
>>> app = Flask(__name__)
|
||||||
>>> @app.teardown_request
|
>>> @app.teardown_request
|
||||||
... def after_request(exception=None):
|
... def teardown_request(exception=None):
|
||||||
... print 'after request'
|
... print 'this runs after request'
|
||||||
...
|
...
|
||||||
>>> ctx = app.test_request_context()
|
>>> ctx = app.test_request_context()
|
||||||
>>> ctx.push()
|
>>> ctx.push()
|
||||||
>>> ctx.pop()
|
>>> ctx.pop()
|
||||||
after request
|
this runs after request
|
||||||
|
>>>
|
||||||
|
|
||||||
.. _notes-on-proxies:
|
.. _notes-on-proxies:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue