forked from orbit-oss/flask
Merge pull request #997 from charlax/ca/fix/response_class_documentation
Clarify the after_request argument
This commit is contained in:
commit
ff3ef8511e
1 changed files with 5 additions and 3 deletions
|
|
@ -1219,9 +1219,11 @@ class Flask(_PackageBoundObject):
|
||||||
|
|
||||||
@setupmethod
|
@setupmethod
|
||||||
def after_request(self, f):
|
def after_request(self, f):
|
||||||
"""Register a function to be run after each request. Your function
|
"""Register a function to be run after each request.
|
||||||
must take one parameter, a :attr:`response_class` object and return
|
|
||||||
a new response object or the same (see :meth:`process_response`).
|
Your function must take one parameter, an instance of
|
||||||
|
:attr:`response_class` and return a new response object or the
|
||||||
|
same (see :meth:`process_response`).
|
||||||
|
|
||||||
As of Flask 0.7 this function might not be executed at the end of the
|
As of Flask 0.7 this function might not be executed at the end of the
|
||||||
request in case an unhandled exception occurred.
|
request in case an unhandled exception occurred.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue