httk.web.templating.httk_compat

Attributes

Classes

HttkCompatTemplateEngine

Legacy-oriented template resolution for old httkweb projects.

Module Contents

httk.web.templating.httk_compat.LEGACY_TEMPLATE_SUFFIXES: tuple[str, Ellipsis] = ('.httkweb.html', '.html', '.html.j2', '.jinja', '.j2')[source]
class httk.web.templating.httk_compat.HttkCompatTemplateEngine(template_dir: pathlib.Path)[source]

Bases: httk.web.templating.jinja2_engine.JinjaTemplateEngine

Legacy-oriented template resolution for old httkweb projects.

The compatibility engine keeps Jinja rendering but prioritizes legacy template suffixes so old .httkweb.html files resolve first.

render(render_input: httk.web.templating.base.TemplateRenderInput) str[source]
render_fragment(*, template_name: str, context: dict[str, object]) str | None[source]