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 content to be flashed and displayed to the user. |
| category | str = "message" | The category for the message used to group or style messages (e.g., 'error', 'info', 'warning'). |
Returns
| Type | Description |
|---|---|
None | Nothing is returned; the message is stored in the session for the next request. |