Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Classe « Scaffold »

Méthode flask.blueprints.Scaffold.after_request

Signature de la méthode after_request

def after_request(self, f: Callable[[ForwardRef('Response')], ForwardRef('Response')]) -> Callable[[ForwardRef('Response')], ForwardRef('Response')] 

Description

after_request.__doc__

Register a function to run after each request to this object.

        The function is called with the response object, and must return
        a response object. This allows the functions to modify or
        replace the response before it is sent.

        If a function raises an exception, any remaining
        ``after_request`` functions will not be called. Therefore, this
        should not be used for actions that must execute, such as to
        close resources. Use :meth:`teardown_request` for that.