Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More



Defines a Loader which is automatically installed to TEMPLATE_LOADERS by lino.core.site


This initializes the SITE.jinja_env object.




Plugin(site, app_label, app_name, ...)

See More about plugins.

class lino.modlib.jinja.Plugin(site, app_label, app_name, app_module, needed_by, configs: dict)

Bases: Plugin

See More about plugins.


This is being called from lino.core.kernel.Kernel.kernel_startup().

Adds a jinja_env attribute to settings.SITE.

Lino has an automatic and currently not configurable method for building Jinja’s template loader. It looks for a “config” subfolder in the following places:

list_templates(ext, *groups)

Return a list of possible choices for a field that contains a template name.

render_from_request(request, template_name, **context)

Render the named Jinja template using an incoming HTTP request.

render_from_ar(ar, template_name, **context)

Render the named Jinja template using the given action request ar.

render_jinja(ar, tplname, context)

Render the named Jinja template, replacing ar.renderer by the Jinja renderer.