jinja2.ModuleLoader
¶
-
class
jinja2.
ModuleLoader
(path)[source]¶ This loader loads templates from precompiled templates.
Example usage:
>>> loader = ChoiceLoader([ ... ModuleLoader('/path/to/compiled/templates'), ... FileSystemLoader('/path/to/templates') ... ])
Templates can be precompiled with
Environment.compile_templates()
.
Methods¶
__init__ (path) |
|
get_module_filename (name) |
|
get_source (environment, template) |
Get the template source, filename and reload helper for a template. |
get_template_key (name) |
|
list_templates () |
Iterates over all templates. |
load (environment, name[, globals]) |
Attributes¶
has_source_access |