Home | History | Annotate | Download | only in jinja2

Lines Matching full:loader

6     Jinja loader classes.
40 `get_template` method that calls the loader's `load` method to get the
43 A very basic example for a loader that looks up templates on the file
64 #: if set to `False` it indicates that the loader cannot provide access
80 if no loader extension is used.
94 """Iterates over all templates. If the loader does not support that
97 raise TypeError('this loader cannot iterate over all templates')
139 """Loads templates from the file system. This loader can find templates
142 The loader takes the path to the templates as string, or if multiple
146 >>> loader = FileSystemLoader('/path/to/templates')
147 >>> loader = FileSystemLoader(['/path/to/templates', '/other/path'])
200 loader = PackageLoader('mypackage', 'views')
262 strings bound to template names. This loader is useful for unittesting:
264 >>> loader = DictLoader({'index.html': 'source here'})
283 """A loader that is passed a function which does the loading. The
292 >>> loader = FunctionLoader(load_template)
313 """A loader that is passed a dict of loaders where each loader is bound
318 loader = PrefixLoader({
334 loader = self.mapping[prefix]
337 return loader, name
340 loader, name = self.get_loader(template)
342 return loader.get_source(environment, name)
350 loader, local_name = self.get_loader(name)
352 return loader.load(environment, local_name)
360 for prefix, loader in iteritems(self.mapping):
361 for template in loader.list_templates():
367 """This loader works like the `PrefixLoader` just that no prefix is
368 specified. If a template could not be found by one loader the next one
371 >>> loader = ChoiceLoader([
384 for loader in self.loaders:
386 return loader.get_source(environment, template)
393 for loader in self.loaders:
395 return loader.load(environment, name, globals)
402 for loader in self.loaders:
403 found.update(loader.list_templates())
412 """This loader loads templates from precompiled templates.
416 >>> loader = ChoiceLoader([
443 # loader that created it goes out of business.
467 # on the module object we have stored on the loader.