litestar.ChameleonTemplate

A page template as Litestar’s TemplateProtocol: render(**context) renders it with

Usage

Source

litestar.ChameleonTemplate()

the engine’s template callables bound to the context.

Methods

Name Description
render() The page, rendered with kwargs as the context (Litestar passes no positional
render_async() render as a coroutine: the template’s render_async (awaitable values are

render()

The page, rendered with kwargs as the context (Litestar passes no positional

Usage

Source

render(*args, **kwargs)

arguments).


render_async()

render as a coroutine: the template’s render_async (awaitable values are

Usage

Source

render_async(**kwargs)

awaited where the template uses them). Litestar’s Template response never calls it; it is for code rendering a template itself.