module documentation

API and implementations for loading templates from different data sources.

Class BaseLoader Baseclass for all loaders. Subclass this and override `get_source` to implement a custom loading mechanism. The environment provides a `get_template` method that calls the loader's `load` method to get the :class:`Template` object.
Class ChoiceLoader 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.
Class DictLoader Loads a template from a Python dict mapping template names to template source. This loader is useful for unittesting:
Class FileSystemLoader Load templates from a directory in the file system.
Class FunctionLoader A loader that is passed a function which does the loading. The function receives the name of the template and has to return either a string with the template source, a tuple in the form ``(source, filename, uptodatefunc)`` or `None` if the template does not exist.
Class ModuleLoader This loader loads templates from precompiled templates.
Class PackageLoader Load templates from a directory in a Python package.
Class PrefixLoader A loader that is passed a dict of loaders where each loader is bound to a prefix. The prefix is delimited from the template by a slash per default, which can be changed by setting the `delimiter` argument to something else::...
Function split_template_path Split a path into segments and perform a sanity check. If it detects '..' in the path it will raise a `TemplateNotFound` error.
Class _TemplateModule Like a normal module but with support for weak references
def split_template_path(template): (source)

Split a path into segments and perform a sanity check. If it detects '..' in the path it will raise a `TemplateNotFound` error.

Parameters
template:strUndocumented
Returns
t.List[str]Undocumented