wijjit.core.templating.RenderedView
- class wijjit.core.templating.RenderedView(template='', template_file='', context=<factory>)[source]
Immutable result of a view function describing what to render.
A view function returns one of these (via
render_template_string()orrender_template()) instead of the legacy{"template": ..., "data": {...}}dict. Exactly one oftemplateortemplate_fileis set.- Parameters:
template (
str, optional) – Inline template source. Mutually exclusive withtemplate_file.template_file (
str, optional) – Template filename to load from the configured template directory. Mutually exclusive withtemplate.context (
dict, optional) – Mapping of names made available to the template.stateis injected automatically by the renderer if not present, so templates can always use{{ state.x }}.
Notes
Lifecycle hooks (
on_enter/on_exit) are not carried here - they are declared on the@app.view(...)decorator, which keeps per-render output separate from view lifecycle configuration.- __init__(template='', template_file='', context=<factory>)
Methods
__init__([template, template_file, context])Attributes