Jinja Rendering
nautobot_design_builder.jinja2
¶
Jinja2 related filters and environment methods.
new_template_environment(root_context, base_dir=None, native_environment=False)
¶
Create a new template environment that will resolve identifiers using the supplied root_context.
If base_dir is supplied, templates will be matched from the base directory provided.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_context |
Context
|
Context object to use when resolving missing identifiers in the rendering process |
required |
base_dir |
str
|
Path, or list of paths, to use as search paths for finding templates. |
None
|
native_environment |
bool
|
To use native JinjaEnvironment |
False
|
Returns:
Name | Type | Description |
---|---|---|
NativeEnvironment |
NativeEnvironment
|
Jinja native environment |