Jinja

Latest version: v1.2

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 8

2.3

-----------

Released 2010-02-10, codename 3000 Pythons

- Fixes issue with code generator that causes unbound variables to be
generated if set was used in if-blocks and other small identifier
problems.
- Include tags are now able to select between multiple templates and
take the first that exists, if a list of templates is given.
- Fixed a problem with having call blocks in outer scopes that have an
argument that is also used as local variable in an inner frame
:issue:`360`.
- Greatly improved error message reporting :pr:`339`
- Implicit tuple expressions can no longer be totally empty. This
change makes ``{% if %}`` a syntax error now. :issue:`364`
- Added support for translator comments if extracted via babel.
- Added with-statement extension.
- Experimental Python 3 support.

2.2.1

-------------

Released 2009-09-14

- Fixes some smaller problems for Jinja on Jython.

2.2

-----------

Released 2009-09-13, codename Kong

- Include statements can now be marked with ``ignore missing`` to skip
non existing templates.
- Priority of ``not`` raised. It's now possible to write ``not foo in
bar`` as an alias to ``foo not in bar`` like in python. Previously
the grammar required parentheses (``not (foo in bar)``) which was
odd.
- Fixed a bug that caused syntax errors when defining macros or using
the ``{% call %}`` tag inside loops.
- Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible.
- Made it possible to refer to names from outer scopes in included
templates that were unused in the callers frame :issue:`327`
- Fixed a bug that caused internal errors if names where used as
iteration variable and regular variable *after* the loop if that
variable was unused *before* the loop. :pr:`331`
- Added support for optional ``scoped`` modifier to blocks.
- Added support for line-comments.
- Added the ``meta`` module.
- Renamed (undocumented) attribute "overlay" to "overlayed" on the
environment because it was clashing with a method of the same name.
- Speedup extension is now disabled by default.

2.1.1

-------------

Released 2008-12-25

- Fixed a translation error caused by looping over empty recursive
loops.

2.1

-----------

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 by
``foo.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 like ``dictsort`` but for arbitrary
sequences.
- Fixed a bug with empty statements in macros.
- Implemented a bytecode cache system.
- 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

2.0

-----------

Released 2008-07-17, codename Jinjavitus

- The subscribing of objects (looking up attributes and items) changed
from slightly. It's now possible to give attributes or items a
higher priority by either using dot-notation lookup or the bracket
syntax. This also changed the AST slightly. ``Subscript`` is gone
and was replaced with ``Getitem`` and ``Getattr``.
- Added support for preprocessing and token stream filtering for
extensions. This would allow extensions to allow simplified gettext
calls in template data and something similar.
- Added ``TemplateStream.dump``.
- Added missing support for implicit string literal concatenation.
``{{ "foo" "bar" }}`` is equivalent to ``{{ "foobar" }}``
- ``else`` is optional for conditional expressions. If not given it
evaluates to ``false``.
- Improved error reporting for undefined values by providing a
position.
- ``filesizeformat`` filter uses decimal prefixes now per default and
can be set to binary mode with the second parameter.
- Fixed bug in finalizer

Page 7 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.