abort(status: Union[int, ForwardRef('Response')], *args: Any, **kwargs: Any) -> 'te.NoReturn' |
Raises an :py:exc:`HTTPException` for the given status code or WSGI [extrait de abort.__doc__] |
after_this_request(f: Callable[[ForwardRef('Response')], ForwardRef('Response')]) -> Callable[[ForwardRef('Response')], ForwardRef('Response')] |
Executes a function after this request. This is useful to modify [extrait de after_this_request.__doc__] |
copy_current_request_context(f: Callable) -> Callable |
A helper function that decorates a function to retain the current [extrait de copy_current_request_context.__doc__] |
escape |
Replace the characters ``&``, ``<``, ``>``, ``'``, and ``"`` in the string with HTML-safe sequences. Use this if you need to display text that might contain such characters in HTML. [extrait de escape.__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: Iterable[str] = ()) -> Union[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) -> 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: Any, **kwargs: Any) -> 'Response' |
Serialize data to JSON and wrap it in a :class:`~flask.Response` [extrait de jsonify.__doc__] |
make_response(*args: 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: Optional[Type[ForwardRef('Response')]] = None) -> 'Response' |
Returns a response object (a WSGI application) that, if called, [extrait de redirect.__doc__] |
render_template(template_name_or_list: Union[str, List[str]], **context: Any) -> str |
Renders a template from the template folder with the given [extrait de render_template.__doc__] |
render_template_string(source: str, **context: Any) -> str |
Renders a template from the given template source string [extrait de render_template_string.__doc__] |
safe_join(directory: str, *pathnames: str) -> str |
Safely join zero or more untrusted path components to a base [extrait de safe_join.__doc__] |
send_file(path_or_file: Union[os.PathLike, str, BinaryIO], mimetype: Optional[str] = None, as_attachment: bool = False, download_name: Optional[str] = None, attachment_filename: Optional[str] = None, conditional: bool = True, etag: Union[bool, str] = True, add_etags: Optional[bool] = None, last_modified: Union[datetime.datetime, int, float, NoneType] = None, max_age: Union[int, Callable[[Optional[str]], Optional[int]], NoneType] = None, cache_timeout: Optional[int] = None) |
Send the contents of a file to the client. [extrait de send_file.__doc__] |
send_from_directory(directory: Union[os.PathLike, str], path: Union[os.PathLike, str], filename: Optional[str] = None, **kwargs: Any) -> 'Response' |
Send a file from within a directory using :func:`send_file`. [extrait de send_from_directory.__doc__] |
stream_with_context(generator_or_function: Union[Iterator[~AnyStr], Callable[..., Iterator[~AnyStr]]]) -> Iterator[~AnyStr] |
Request contexts disappear when the response is started on the server. [extrait de stream_with_context.__doc__] |
url_for(endpoint: str, **values: Any) -> str |
Generates a URL to the given endpoint with the method provided. [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 :