reportcompiler.plugins.template_renderers.base¶
base.py
This module includes the base plugin interface for template renderers.
Classes¶
TemplateRenderer: Plugin that implements the template rendering stage for the document (see
-
class
reportcompiler.plugins.template_renderers.base.TemplateRenderer¶ Plugin that implements the template rendering stage for the document (see architecture).
Inheritance
-
included_templates(content)¶ Returns the included templates in the specified content.
Parameters: content (str) – Template content Returns: List of included templates Return type: list
-
classmethod
raise_rendering_exception(context, exception=None, message=None)¶ Returns a template rendering exception with the necessary info attached.
Parameters: - context (dict) – Context for fragment
- exception (Exception) – Exception returned by template rendering
- message (str) – Optional message for exception
-
render_template(doc_param, context)¶ Renders the template after the context is generated for all fragments.
Parameters: - doc_param (OrderedDict) – Document variable
- context (dict) – Context dictionary with keys ‘data’ (context generated from fragments) and ‘meta’ (document metadata)
-