Skip to content

Allow configuration of Jinja extensions #17

@dannyadair

Description

@dannyadair

In render.py's create_env():

    env = jinja2.Environment(
        loader=jinja2.FileSystemLoader(str(templates_dir)),
        autoescape=jinja2.select_autoescape(),
        extensions=["jinja2.ext.do"],
    )

The "do" is needed for one of our messy templates.
Would like to remove that again.
But what if someone else needs it?

Add a YML config option (on any level) to set the extensions.

P.S.: Maybe also "autoescape"? Will wait for feature request (templates have the safe filter).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions