mewlo.mpacks.core.template.mjinja2_loader module Custom loader used to find jinja2 templates. This is a class that Jinja system uses to help it lookup referenced files; our version lets it find mewlo files.

class mewlo.mpacks.core.template.mjinja2_loader.MewloJinja2Environment(mewlosite, loader, undefined)[source]

Bases: jinja2.environment.Environment

Our custom jinja2 environment knows how to locate relative paths.

join_path(template, parent)[source]

Override join_path() to enable relative template paths.

class mewlo.mpacks.core.template.mjinja2_loader.MewloJinja2Loader(mewlosite)[source]

Bases: jinja2.loaders.BaseLoader

Our custom jinja2 template loader is used to load TEMPLATE FILES; it knows how to resolve alias paths.

get_source(environment, template)[source]

Table Of Contents

Previous topic

mewlo.mpacks.core.template package

Next topic

mewlo.mpacks.core.template.mtemplate module

This Page