Skip to main content

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

NameTypeDescription
messagestrthe message to be flashed.
categorystr = "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

TypeDescription
None