mewlo.mpacks.core.template.mtemplate_jinja2 module

mtemplate_jinja2.py Derived template for jinja2.

class mewlo.mpacks.core.template.mtemplate_jinja2.MewloTemplate_Jinja2(templatemanager)[source]

Bases: mewlo.mpacks.core.template.mtemplate.MewloTemplate

The MewloTemplate class represents a single template file.

classmethod dumps(indent=0)[source]

Return a string (with newlines and indents) that displays some debugging useful information about the object. Note that this is a CLASS function since we just want info about the class not a particular instance.

getmake_jinja2_environment(templatemanager)[source]

Class singleton reference to the jinja2 engine, created on first use.

load_from_file(filepath)[source]

Load a template from a file.

render_string(args={})[source]

Render template into a string and return string. Use args dictionary to pass in values.

templatetype_extensions = ('.jn2',)
templatetype_id = 'jinja2'

Table Of Contents

Previous topic

mewlo.mpacks.core.template.mtemplate module

Next topic

mewlo.mpacks.core.template.mtemplatehelper module

This Page