get_flashed_messages
Pulls all flashed messages from the session and returns them. Further calls in the same request to the function will return the same messages. By default just the messages are returned, but when with_categories is set to True, the return value will be a list of tuples in the form (category, message) instead.
def 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. Further calls in the same request to the function will return the same messages. By default just the messages are returned, but when with_categories is set to True, the return value will be a list of tuples in the form (category, message) instead.
Parameters
| Name | Type | Description |
|---|---|---|
| with_categories | bool = False | Whether to return the message category along with the message text as a tuple. |
| category_filter | t.Iterable[str] = () | An iterable of category names used to restrict the returned messages to only those matching the specified categories. |
Returns
| Type | Description |
|---|---|
| `list[str] | list[tuple[str, str]]` |