The JIP templates module wraps around the jinja2 template engine used and allows to render job templates and other strings.
The module stores a global context that is used during script evaluation and implements the JIP filter functions. The template environment is stored as a global reverence and the template engine is exposed thought the render_template() function.
Custom undefined implementation that does not modify unknown variables
Exception raised in case a tempalte could not be rendered properly
the jinja2 environment
Cut away the last file extension splitted by splitter. The default splitter is .
| Parameters: |
|
|---|
Returns the name of the parent directory of the given file path
| Parameters: |
|
|---|---|
| Returns: | the name of the parent directory |
Render a template using the given keyword arguments as context
| Parameters: |
|
|---|
Replaces all hits of the pattern woth the replacement string
| Parameters: |
|
|---|---|
| Returns: | the new string |