Jinja2 v2.1 Release Notes
-
๐ Released 2008-11-23, codename Yasuzล
- ๐ Fixed a bug with nested loops and the special loop variable. Before the change an inner loop overwrote the loop variable from the outer one after iteration.
- ๐ Fixed a bug with the i18n extension that caused the explicit pluralization block to look up the wrong variable.
- ๐ Fixed a limitation in the lexer that made
{{ foo.0.0 }}
impossible. - Index based subscribing of variables with a constant value returns an undefined object now instead of raising an index error. This was a bug caused by eager optimizing.
- The i18n extension looks up
foo.ugettext
now followed byfoo.gettext
if an translations object is installed. This makes dealing with custom translations classes easier. - ๐ Fixed a confusing behavior with conditional extending. loops were partially executed under some conditions even though they were not part of a visible area.
- Added
sort
filter that works likedictsort
but for arbitrary sequences. - ๐ Fixed a bug with empty statements in macros.
- Implemented a bytecode cache system. (:ref:
bytecode-cache
) - The template context is now weakref-able
- Inclusions and imports "with context" forward all variables now, not only the initial context.
- Added a cycle helper called
cycler
. - Added a joining helper called
joiner
. - Added a
compile_expression
method to the environment that allows compiling of Jinja expressions into callable Python objects. - ๐ Fixed an escaping bug in urlize