OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, path) |
def | load (self, environment, name, globals=None) |
![]() | |
def | get_source (self, environment, template) |
def | list_templates (self) |
Static Public Member Functions | |
def | get_template_key (name) |
def | get_module_filename (name) |
Data Fields | |
module | |
package_name | |
Static Public Attributes | |
has_source_access | |
![]() | |
has_source_access | |
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 :meth:`Environment.compile_templates`.
def __init__ | ( | self, | |
path | |||
) |
|
static |
|
static |
def load | ( | self, | |
environment, | |||
name, | |||
globals = None |
|||
) |
Loads a template. This method looks up the template in the cache or loads one by calling :meth:`get_source`. Subclasses should not override this method as loaders working on collections of other loaders (such as :class:`PrefixLoader` or :class:`ChoiceLoader`) will not call this method but `get_source` directly.
Reimplemented from BaseLoader.
|
static |
module |
package_name |