after_request(*args, **kwargs)¶
Register a function to be run after each request.
Your function must take one parameter,
a response_class object and return a new response object or the same (see process_response()).
As of Flask 0.7 this function might not be executed at the end of the request
in case an unhandled exception occurred.
http://docs.jinkan.org/docs/f...