jinja
jinja copied to clipboard
A very fast and expressive template engine.
At the top of my templates, I do something like: ``` {% import 'macros.html' as m %} ``` That macros.html file is gigantic. I tried moving some of the macros...
If using caching and the `ChoiceHandler` class, newly added templates in locations other than where a previously cached template lives, are ignored by `Environment.get_template()`. The `uptodate()` methods to not currently...
Any interest in including something like this: https://github.com/miracle2k/jinja2utils/blob/master/src/jinja2utils/match.py I have just written this code a second time, needing it again and not remembering I had already implemented it once. It...
Right now the choice loader and the prefix loader are using get_source to load templates. That's unfortunate because not every loader can provide the source for templates (for example the...
Right now if three templates down the line all import with context the same thing make_module is called a whole bunch of times. That might be worth caching if possible....
Change order of evaluating expressions with pow by Parser. - fixes #1720 - fixes #1722 Checklist: - [x] Add tests that demonstrate the correct behavior of the change. Tests should...
Discovered it when working on #1720. Looks like the fix will fix both issues. ### Minimal reproducible example ```python from jinja2 import Environment env = Environment() tmpl = env.from_string('{{ 2...
Unexpected behavior of the power operator with a variable of even value as exponent. It returns the negative value of the expected result. ## mcve ```python from jinja2 import Environment...
Filter name used in templates must match a key in the filters map.
### Current debug extension Currently, when the debug extension is added, `{% debug %}` is rendered with a pprint that injects `\n` chars. This has the effect that pretty printing...