flash
Flashes a message to the next request. In order to remove the
flashed message from the session and to display it to the user,
the template has to call :func:get_flashed_messages.
def flash(
message: str,
category: str = "message"
) - > None
Flashes a message to the next request. In order to remove the
flashed message from the session and to display it to the user,
the template has to call :func:get_flashed_messages.
Parameters
| Name | Type | Description |
|---|---|---|
| message | str | the message to be flashed. |
| category | str = "message" | the category for the message. The following values are recommended: 'message' for any kind of message, 'error' for errors, 'info' for information messages and 'warning' for warnings. However any kind of string can be used as category. |
Returns
| Type | Description |
|---|---|
None | Nothing is returned; the message is stored in the session for the next request. |