flash#

Plugin for creating and retrieving flash messages.

class litestar.plugins.flash.FlashConfig#

Bases: object

Configuration for Flash messages.

__init__(template_config: TemplateConfig) None#
class litestar.plugins.flash.FlashPlugin#

Bases: InitPluginProtocol

Flash messages Plugin.

__init__(config: FlashConfig)#

Initialize the plugin.

Parameters:

config – Configuration for flash messages, including the template engine instance.

on_app_init(app_config: AppConfig) AppConfig#

Register the message callable on the template engine instance.

Parameters:

app_config – The application configuration.

Returns:

The application configuration with the message callable registered.