reportcompiler.plugins.template_renderers.jinja2
¶
jinja2.py
This module includes the template renderer using jinja2 (and derivatives).
Classes¶
JinjaRenderer
: Template renderer for jinja2.JinjaLatexRenderer
: Template renderer for jinja2, with latex-friendly syntax.
-
class
reportcompiler.plugins.template_renderers.jinja2.
JinjaRenderer
¶ Template renderer for jinja2.
Inheritance
-
get_fragment_start_comment
(name)¶ Returns the comment that will be inserted before the fragment template.
Parameters: name (str) – fragment name Returns: Comment to be inserted before the template Return type: str
-
included_templates
(content)¶ Returns the included templates in the specified content.
Parameters: content (str) – Template content Returns: List of included templates Return type: list
-
render_template
(doc_param, template_tree, context)¶ Renders the template after the context is generated for all fragments.
Parameters: - doc_param (OrderedDict) – Document variable.
- template_tree (anytree) – Tree with the templates to be rendered.
- context (dict) – Context dictionary with keys ‘data’ (context generated from fragments) and ‘meta’ (document metadata).
-
-
class
reportcompiler.plugins.template_renderers.jinja2.
JinjaLatexRenderer
¶ Template renderer for jinja2, with latex-friendly syntax.
Inheritance
-
get_fragment_start_comment
(name)¶ Returns the comment that will be inserted before the fragment template.
Parameters: name (str) – fragment name Returns: Comment to be inserted before the template Return type: str
-
included_templates
(content)¶ Returns the included templates in the specified content.
Parameters: content (str) – Template content Returns: List of included templates Return type: list
-