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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé
Module « flask »

Fonction abort - module flask

Signature de la fonction abort

def abort(code: 'int | BaseResponse', *args: 't.Any', **kwargs: 't.Any') -> 't.NoReturn' 

Description

help(flask.abort)

Raise an :exc:`~werkzeug.exceptions.HTTPException` for the given
status code.

If :data:`~flask.current_app` is available, it will call its
:attr:`~flask.Flask.aborter` object, otherwise it will use
:func:`werkzeug.exceptions.abort`.

:param code: The status code for the exception, which must be
    registered in ``app.aborter``.
:param args: Passed to the exception.
:param kwargs: Passed to the exception.

.. versionadded:: 2.2
    Calls ``current_app.aborter`` if available instead of always
    using Werkzeug's default ``abort``.


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé