flash

Plugin for creating and retrieving flash messages.

class litestar.plugins.flash.FlashConfig[源代码]

基类:object

Configuration for Flash messages.

__init__(template_config: TemplateConfig) None
class litestar.plugins.flash.FlashPlugin[源代码]

基类:InitPlugin

Flash messages Plugin.

__init__(config: FlashConfig)[源代码]

Initialize the plugin.

参数:

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.

参数:

app_config -- The application configuration.

返回:

The application configuration with the message callable registered.