| 1 |
from litestar import Litestar |
| 2 |
from litestar.contrib.mako import MakoTemplateEngine |
| 3 |
from litestar.middleware.session.server_side import ServerSideSessionConfig |
| 4 |
from litestar.plugins.flash import FlashConfig, FlashPlugin |
| 5 |
from litestar.template.config import TemplateConfig |
| 6 |
|
| 7 |
template_config = TemplateConfig(engine=MakoTemplateEngine, directory="templates") |
| 8 |
flash_plugin = FlashPlugin(config=FlashConfig(template_config=template_config)) |
| 9 |
|
| 10 |
app = Litestar( |
| 11 |
plugins=[flash_plugin], |
| 12 |
middleware=[ServerSideSessionConfig().middleware], |
| 13 |
) |