6 (codename to be selected, release date unknown)
8 - environments now have a `translator_factory` parameter that allows
9 to change the translator without subclassing the environment.
11 - fixed bug in buffet plugin regarding the package loader
13 - once again improved debugger.
15 - added `groupby` filter.
17 - added `sameas` test function.
19 - standalone parser. Jinja does not use the python parser any more and will
20 continue having the same semantics in any future python versions. This
21 was done in order to simplify updating Jinja to 2.6 and 3.0 and to support
24 - added support for ``expr1 if test else expr2`` (conditional expressions)
26 - ``foo.0`` as alias for ``foo[0]`` is possible now. This is mainly for
29 - the filter operators has a much higher priority now which makes it
30 possible to do ``foo|filter + bar|filter``.
32 - new AST. the return value of `Environment.parse` is now a Jinja AST and not
33 a Jinja-Python AST. This is also the only backwards incompatible change but
34 should not affect many users because this feature is more or less
35 undocumented and has few use cases.
37 - tuple syntax returns tuples now and not lists any more.
39 - the print directive and ``{{ variable }}`` syntax now accepts and implicit
40 tuple like the `for` and `cycle` tags. (``{{ 1, 2 }}`` is an implicit alias
41 for ``{{ (1, 2) }}` like ``{% for a, b in seq %}`` is for
42 ``{% for (a, b) in seq %}``.
44 - tests called with *one* parameter don't need parentheses. This gives a more
45 natural syntax for the `sameas` test and some others:
46 ``{{ foo is sameas bar }}`` instead of ``{{ foo is sameas(bar) }}``. If you
47 however want to pass more than one argument you have to use parentheses
48 because ``{{ foo is sometest bar, baz }}`` is handled as
49 ``{{ (foo is sometest(bar), baz) }}``, so as tuple expression.
51 - removed support for octal character definitions in strings such as
52 ``'\14'``, use ``'\x0c'`` now.
54 - added regular expression literal. ``@/expr/flags`` equals
55 ``re.compile(r'(?flags)expr')``. This is useful for the `matching` test and
58 - added set literal. We do not use python3's {1, 2} syntax because
59 this conflicts with the dict literal. To be compatible with the regex
60 literal we use ``@(1, 2)`` instead.
62 - fixed bug in `get_attribute` that disallowed retreiving attributes of objects
63 without a `__class__` such as `_sre.SRE_Pattern`.
65 - addded `django.contrib.jinja` which provides advanced support for django.
66 (thanks Bryan McLemore)
68 - debugger is now able to rewrite the whole traceback, not only the first
69 frame. (requires the optional debugger c module which is compiled
70 automatically on installation if possible)
72 - if the set that is postfixed with a bang (!) it acts like the python 3
73 "nonlocal" keyword. This means that you can now override variables
74 defined in the outer scope from within a loop.
76 - ``foo + bar`` is now a simpler alternative to ``foo|string + bar|string``
78 - `PackageLoader` can now work without pkg_resources too
80 - added `getattribute` and `getitem` filter.
82 - added support for the `pretty` library.
87 (codename: sinka, released Jun 1, 2007)
89 - blocks now support ``{{ super() }}`` to render the parent output.
91 - debugging system improved, smaller filesize for the cached files.
92 Debugging works now well for any module using linecache.
94 - ``{{ debug() }}`` can now be used to get a list of filters and
97 - the template lexer keeps not track of brace, parenthesis and
98 bracket balance in order to not break variable tags apart if they
99 are configured to look like this: ``${expr}``. This also fixes
100 the problem with nested dicts in variable expressions.
102 - it's now possible to configure the variable blocks to look the
103 same as the block delimiters. Thus you can set the syntax to something
104 like ``{ / }`` for both blocks and variables.
106 - added whitespace management system for the template designer.
108 - some small bugfixes.
110 - improved security system regarding function calls and variable
111 assignment in for loops.
113 - added `lipsum` function to generate random text.
115 - strings without unicode characters are processed as binary strings now
116 to workaround problems with `datetime.strftime` which only accepts
119 - it's now possible to use newlines in string literals
121 - developer friendly traceback is now toggleable
123 - the variable failure is now pluggable by replacing the undefined
124 singleton for an environment instance
126 - fixed issue with old-style classes not implementing `__getitem__`
127 (thanks to Axel Böhm for discovering that bug)
129 - added a bunch of new docstrings to the Jinja classes. Makes fun now to
132 - fixed severe memcaching bug. Formerly it wasn't possible to use memcaching
133 without enabling disk cache.
135 - fixed a bug that allowed users to override the special names `_`, `true` etc.
137 - added `batch` and `slice` filters for batching or slicing sequences
139 - added `sum`, `abs`, `round` and `sort` filters. This fixes #238
141 - added `striptags` and `xmlattr` filters for easier SGML/XML processing
143 - the trans tag does not need explicit naming for variables with the same
144 name any more. You can now use ``{% trans foo %}`` instead of the verbose
145 version ``{% trans foo=foo %}``.
147 - reimplemented Buffet plugin so that it works at least for pylons
149 - added `Environment.get_translations_for_string`
151 - fixed a bug in the parser that didn't unescape keyword arguments. (thanks
152 to Alexey Melchakov for reporting)
154 - You can now use the environment to just tokenize a template. This can
155 be useful for syntax highlighting or other purposes.
157 - added optional C-implementation of the context baseclass.
159 - you can now use optional parentheses around macro defintions. Thus it's
160 possible to write ``{% macro foo(a, b, c) %}`` instead of ``{% macro
163 - additional macro arguments now end up in `varargs`.
165 - implemented the `{% call %}` block. `call` and `endcall` can still be used
166 as identifiers until Jinja 1.3
168 - it's now possible to stream templates.
170 - fixed a corner case when defining a block inside of a condition
172 - the cached loader mixin is now able to cache multiple templates from
173 different loaders in the same cache folder.
175 - Translatable strings returned by ``_()`` will leave their string formatting
176 signs untouched. Thanks to Stefan Ebner for reporting.
178 - ``{% block name "data" %}`` is now an alias for
179 ``{% block name %}data{% endblock %}``. Note that the second argument can
180 be an expression. As soon as you specify an expression as second argument
181 the closing tag has to be omitted.
183 - It's now possible to iterate over iterators additionally to sequences.
184 If the iterator is inifite it will crash however, so makes sure you don't
185 pass something like that to a template!
187 - added `rendetemplate` to render included templates in an isolated
188 environment and get the outout back.
190 - added `simplefilter` decorator.
192 - improved ChoiceLoader error reporting (thanks to Bryan McLemore)
194 - fixed extended slicing
196 - reworked loader layer. All the cached loaders now have "private" non cached
197 baseclasses so that you can easily mix your own caching layers in.
199 - added `MemcachedLoaderMixin` and `MemcachedFileSystemLoader` contributed
205 (codename: siyutusan, released Mar 23, 2007)