jinja2.ChoiceLoader
¶
-
class
jinja2.
ChoiceLoader
(loaders)[source]¶ This loader works like the PrefixLoader just that no prefix is specified. If a template could not be found by one loader the next one is tried.
>>> loader = ChoiceLoader([ ... FileSystemLoader('/path/to/user/templates'), ... FileSystemLoader('/path/to/system/templates') ... ])
This is useful if you want to allow users to override builtin templates from a different location.
Methods¶
__init__ (loaders) |
|
get_source (environment, template) |
|
list_templates () |
|
load (environment, name[, globals]) |
Attributes¶
has_source_access |