Made it possible to refer to names from outer scopes in included templates
[jinja2.git] / CHANGES
1 Jinja2 Changelog
2 ================
3
4 Version 2.2
5 -----------
6 (codename unknown, release date yet unknown)
7
8 - Include statements can now be marked with ``ignore missing`` to skip
9   non existing templates.
10 - Priority of `not` raised.  It's now possible to write `not foo in bar`
11   as an alias to `foo not in bar` like in python.  Previously the grammar
12   required parentheses (`not (foo in bar)`) which was odd.
13 - Fixed a bug that caused syntax errors when defining macros or using the
14   `{% call %}` tag inside loops.
15 - Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible.
16 - Made it possible to refer to names from outer scopes in included templates
17   that were unused in the callers frame (#327)
18
19 Version 2.1.1
20 -------------
21 (Bugfix release)
22
23 - Fixed a translation error caused by looping over empty recursive loops.
24
25 Version 2.1
26 -----------
27 (codename Yasuzō, released on November 23rd 2008)
28
29 - fixed a bug with nested loops and the special loop variable.  Before the
30   change an inner loop overwrote the loop variable from the outer one after
31   iteration.
32
33 - fixed a bug with the i18n extension that caused the explicit pluralization
34   block to look up the wrong variable.
35
36 - fixed a limitation in the lexer that made ``{{ foo.0.0 }}`` impossible.
37
38 - index based subscribing of variables with a constant value returns an
39   undefined object now instead of raising an index error.  This was a bug
40   caused by eager optimizing.
41
42 - the i18n extension looks up `foo.ugettext` now followed by `foo.gettext`
43   if an translations object is installed.  This makes dealing with custom
44   translations classes easier.
45
46 - fixed a confusing behavior with conditional extending.  loops were partially
47   executed under some conditions even though they were not part of a visible
48   area.
49
50 - added `sort` filter that works like `dictsort` but for arbitrary sequences.
51
52 - fixed a bug with empty statements in macros.
53
54 - implemented a bytecode cache system.  (:ref:`bytecode-cache`)
55
56 - the template context is now weakref-able
57
58 - inclusions and imports "with context" forward all variables now, not only
59   the initial context.
60
61 - added a cycle helper called `cycler`.
62
63 - added a joining helper called `joiner`.
64
65 - added a `compile_expression` method to the environment that allows compiling
66   of Jinja expressions into callable Python objects.
67
68 - fixed an escaping bug in urlize
69
70 Version 2.0
71 -----------
72 (codename jinjavitus, released on July 17th 2008)
73
74 - the subscribing of objects (looking up attributes and items) changed from
75   slightly.  It's now possible to give attributes or items a higher priority
76   by either using dot-notation lookup or the bracket syntax.  This also
77   changed the AST slightly.  `Subscript` is gone and was replaced with
78   :class:`~jinja2.nodes.Getitem` and :class:`~jinja2.nodes.Getattr`.
79
80   For more information see :ref:`the implementation details <notes-on-subscriptions>`.
81
82 - added support for preprocessing and token stream filtering for extensions.
83   This would allow extensions to allow simplified gettext calls in template
84   data and something similar.
85
86 - added :meth:`jinja2.environment.TemplateStream.dump`.
87
88 - added missing support for implicit string literal concatenation.
89   ``{{ "foo" "bar" }}`` is equivalent to ``{{ "foobar" }}``
90
91 - `else` is optional for conditional expressions.  If not given it evaluates
92   to `false`.
93
94 - improved error reporting for undefined values by providing a position.
95
96 - `filesizeformat` filter uses decimal prefixes now per default and can be
97   set to binary mode with the second parameter.
98
99 - fixed bug in finalizer
100
101 Version 2.0rc1
102 --------------
103 (no codename, released on June 9th 2008)
104
105 - first release of Jinja2