Undocumented
| Module | expression |
Module that contains the logic for evaluating expressions in the template. |
| Module | expressionparser |
This module contains the parser to parse expressions in templates and returns an Expression object. |
| Module | functions |
This module contains generic template functions. |
| Module | parser |
This module defines the main parser for template text. |
| Module | processor |
This module contains the main object to "execute" a template and fill in the parameters, call functions etc. The TemplateProcessor defined here takes care of the template control flow ('IF', 'FOR', etc.). |
From __init__.py:
| Class | Template |
This class defines the main interface for templates It takes care of parsing a template file and allows evaluating the template with a given set of template parameters. |
| Function | get_template |
No summary |
| Function | list_template_categories |
Returns a list of categories (sub folders) |
| Function | list_templates |
No summary |
| Variable | logger |
Undocumented |
| Function | _get_template_for_string |
Undocumented |
| Parameters | |
| category | a category (sub folder) with tempaltes, e.g. "html" |
| Returns | |
| a list of 2-tuples of the template names and the file basename for the template file | |
Template objects to allow using those objects directly with existing Template object as well.| Parameters | |
| category | the template category (e.g. "html"). Use to resolve the template if a template name is given |
| template | the template name, file path, File object or Template object |
| pwd | working directory as a string, or None. Used to resolve relative file paths. Should typically only be used when processing commandline arguments |
| Returns | |
a Template object | |
| Raises | |
Unknown exception | ValueError if template is another type |
Unknown exception | FileNotFoundError if template could not be resolved |