Skip to content

Added: Jinja2 Environment extension on files generation stage#1419

Merged
insspb merged 5 commits intomasterfrom
jinja2-environment
May 30, 2020
Merged

Added: Jinja2 Environment extension on files generation stage#1419
insspb merged 5 commits intomasterfrom
jinja2-environment

Conversation

@insspb
Copy link
Copy Markdown
Member

@insspb insspb commented May 30, 2020

This is code update for #946, as we do not have access to original branch.

This PR implements option to change default Jinja2 settings by templates developers on template development stage.

@insspb insspb added the enhancement This issue/PR relates to a feature request. label May 30, 2020
@insspb insspb added this to the 2.0.0 milestone May 30, 2020
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit 26bcca5 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 99.7% (0.0% change).

View more on Code Climate.

@insspb insspb merged commit af4474b into master May 30, 2020
@insspb insspb deleted the jinja2-environment branch May 30, 2020 12:56
@insspb insspb self-assigned this May 30, 2020
@bittner
Copy link
Copy Markdown
Contributor

bittner commented Aug 29, 2020

IIUC, this allows us to set (static) Jinja2 environment values.

Non-simple values, such as filters and tests, which are dicts referring to Python code objects, won't be able to set like this. Hence, it still won't be possible to add custom filters "the Jinja way", by simply adding a function reference to the filters dict.

Is there a chance to add that feature before v2.0.0 is released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This issue/PR relates to a feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants