abort(code: 'int | BaseResponse', *args: 't.Any', **kwargs: 't.Any') -> 't.NoReturn' |
Raise an :exc:`~werkzeug.exceptions.HTTPException` for the given [extrait de abort.__doc__] |
after_this_request(f: 'ft.AfterRequestCallable[t.Any]') -> 'ft.AfterRequestCallable[t.Any]' |
Executes a function after this request. This is useful to modify [extrait de after_this_request.__doc__] |
copy_current_request_context(f: 'F') -> 'F' |
A helper function that decorates a function to retain the current [extrait de copy_current_request_context.__doc__] |
flash(message: 'str', category: 'str' = 'message') -> 'None' |
Flashes a message to the next request. In order to remove the [extrait de flash.__doc__] |
get_flashed_messages(with_categories: 'bool' = False, category_filter: 't.Iterable[str]' = ()) -> 'list[str] | list[tuple[str, str]]' |
Pulls all flashed messages from the session and returns them. [extrait de get_flashed_messages.__doc__] |
get_template_attribute(template_name: 'str', attribute: 'str') -> 't.Any' |
Loads a macro (or variable) a template exports. This can be used to [extrait de get_template_attribute.__doc__] |
has_app_context() -> 'bool' |
Works like :func:`has_request_context` but for the application [extrait de has_app_context.__doc__] |
has_request_context() -> 'bool' |
If you have code that wants to test if a request context is there or [extrait de has_request_context.__doc__] |
jsonify(*args: 't.Any', **kwargs: 't.Any') -> 'Response' |
Serialize the given arguments as JSON, and return a [extrait de jsonify.__doc__] |
make_response(*args: 't.Any') -> 'Response' |
Sometimes it is necessary to set additional headers in a view. Because [extrait de make_response.__doc__] |
redirect(location: 'str', code: 'int' = 302, Response: 'type[BaseResponse] | None' = None) -> 'BaseResponse' |
Create a redirect response object. [extrait de redirect.__doc__] |
render_template(template_name_or_list: 'str | Template | list[str | Template]', **context: 't.Any') -> 'str' |
Render a template by name with the given context. [extrait de render_template.__doc__] |
render_template_string(source: 'str', **context: 't.Any') -> 'str' |
Render a template from the given source string with the given [extrait de render_template_string.__doc__] |
send_file(path_or_file: 'os.PathLike[t.AnyStr] | str | t.BinaryIO', mimetype: 'str | None' = None, as_attachment: 'bool' = False, download_name: 'str | None' = None, conditional: 'bool' = True, etag: 'bool | str' = True, last_modified: 'datetime | int | float | None' = None, max_age: 'None | (int | t.Callable[[str | None], int | None])' = None) -> 'Response' |
Send the contents of a file to the client. [extrait de send_file.__doc__] |
send_from_directory(directory: 'os.PathLike[str] | str', path: 'os.PathLike[str] | str', **kwargs: 't.Any') -> 'Response' |
Send a file from within a directory using :func:`send_file`. [extrait de send_from_directory.__doc__] |
stream_template(template_name_or_list: 'str | Template | list[str | Template]', **context: 't.Any') -> 't.Iterator[str]' |
Render a template by name with the given context as a stream. [extrait de stream_template.__doc__] |
stream_template_string(source: 'str', **context: 't.Any') -> 't.Iterator[str]' |
Render a template from the given source string with the given [extrait de stream_template_string.__doc__] |
stream_with_context(generator_or_function: 't.Iterator[t.AnyStr] | t.Callable[..., t.Iterator[t.AnyStr]]') -> 't.Iterator[t.AnyStr] | t.Callable[[t.Iterator[t.AnyStr]], t.Iterator[t.AnyStr]]' |
Request contexts disappear when the response is started on the server. [extrait de stream_with_context.__doc__] |
url_for(endpoint: 'str', *, _anchor: 'str | None' = None, _method: 'str | None' = None, _scheme: 'str | None' = None, _external: 'bool | None' = None, **values: 't.Any') -> 'str' |
Generate a URL to the given endpoint with the given values. [extrait de url_for.__doc__] |
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 :