docs/examples/templating/template_engine_jinja.py
raw| 1 | from pathlib import Path |
| 2 | |
| 3 | from litestar import Litestar |
| 4 | from litestar.contrib.jinja import JinjaTemplateEngine |
| 5 | from litestar.template.config import TemplateConfig |
| 6 | |
| 7 | app = Litestar( |
| 8 | route_handlers=[], |
| 9 | template_config=TemplateConfig( |
| 10 | directory=Path("templates"), |
| 11 | engine=JinjaTemplateEngine, |
| 12 | ), |
| 13 | ) |