Browse Source

Updating documentation for app.after_request decorator.

Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
pull/228/merge
Rémy Roy 14 years ago committed by Armin Ronacher
parent
commit
709ecefee1
  1. 5
      flask/app.py

5
flask/app.py

@ -713,7 +713,10 @@ class Flask(_PackageBoundObject):
return f
def after_request(self, f):
"""Register a function to be run after each request."""
"""Register a function to be run after each request. Your function
must take one parameter, a :attr:`response_class` object and return
a new response object or the same (see :meth:`process_response`).
"""
self.after_request_funcs.setdefault(None, []).append(f)
return f

Loading…
Cancel
Save