Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 1 | Jinja Changelog |
| 2 | =============== |
| 3 | |
Armin Ronacher | a7804ef | 2007-06-15 18:03:21 +0200 | [diff] [blame] | 4 | Version 1.2 |
| 5 | ----------- |
| 6 | (codename to be selected, release date unknown) |
| 7 | |
| 8 | - environments now have a `translator_factory` parameter that allows |
| 9 | to change the translator without subclassing the environment. |
| 10 | |
| 11 | - fixed bug in buffet plugin regarding the package loader |
| 12 | |
| 13 | - once again improved debugger. |
| 14 | |
Armin Ronacher | e39a5d2 | 2007-06-23 21:11:53 +0200 | [diff] [blame] | 15 | - added `groupby` filter. |
| 16 | |
Armin Ronacher | 69ddc58 | 2007-06-24 12:37:13 +0200 | [diff] [blame] | 17 | - added `sameas` test function. |
| 18 | |
Armin Ronacher | 1cc232c | 2007-09-07 17:52:41 +0200 | [diff] [blame] | 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 |
| 22 | non python syntax. |
| 23 | |
| 24 | - added support for ``expr1 if test else expr2`` (conditional expressions) |
| 25 | |
| 26 | - ``foo.0`` as alias for ``foo[0]`` is possible now. This is mainly for |
| 27 | django compatibility. |
| 28 | |
| 29 | - the filter operators has a much higher priority now which makes it |
| 30 | possible to do ``foo|filter + bar|filter``. |
| 31 | |
| 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. |
| 36 | |
| 37 | - tuple syntax returns tuples now and not lists any more. |
| 38 | |
| 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 %}``. |
| 43 | |
| 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. |
| 50 | |
| 51 | - removed support for octal character definitions in strings such as |
| 52 | ``'\14'``, use ``'\x0c'`` now. |
| 53 | |
| 54 | - added regular expression literal. ``@/expr/flags`` equals |
| 55 | ``re.compile(r'(?flags)expr')``. This is useful for the `matching` test and |
| 56 | probably some others. |
| 57 | |
| 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. |
| 61 | |
| 62 | - fixed bug in `get_attribute` that disallowed retreiving attributes of objects |
| 63 | without a `__class__` such as `_sre.SRE_Pattern`. |
| 64 | |
| 65 | - addded `django.contrib.jinja` which provides advanced support for django. |
| 66 | (thanks Bryan McLemore) |
| 67 | |
| 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) |
| 71 | |
| 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. |
| 75 | |
| 76 | - ``foo + bar`` is now a simpler alternative to ``foo|string + bar|string`` |
| 77 | |
| 78 | - `PackageLoader` can now work without pkg_resources too |
| 79 | |
| 80 | - added `getattribute` and `getitem` filter. |
| 81 | |
Armin Ronacher | 5f3f136 | 2007-10-21 22:15:04 +0200 | [diff] [blame] | 82 | - added support for the `pretty` library. |
Armin Ronacher | c6a3652 | 2007-10-21 21:38:35 +0200 | [diff] [blame] | 83 | |
Armin Ronacher | 77e2ab5 | 2007-10-22 23:31:48 +0200 | [diff] [blame^] | 84 | - changed the way the `MemcachedLoaderMixin` creates the class so that it's |
| 85 | possible to hook your own client in. |
| 86 | |
Armin Ronacher | a7804ef | 2007-06-15 18:03:21 +0200 | [diff] [blame] | 87 | |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 88 | Version 1.1 |
| 89 | ----------- |
Armin Ronacher | ecc051b | 2007-06-01 18:25:28 +0200 | [diff] [blame] | 90 | (codename: sinka, released Jun 1, 2007) |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 91 | |
| 92 | - blocks now support ``{{ super() }}`` to render the parent output. |
| 93 | |
| 94 | - debugging system improved, smaller filesize for the cached files. |
Armin Ronacher | 859efe0 | 2007-04-05 22:38:44 +0200 | [diff] [blame] | 95 | Debugging works now well for any module using linecache. |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 96 | |
Armin Ronacher | 90a5cb3 | 2007-04-15 00:56:32 +0200 | [diff] [blame] | 97 | - ``{{ debug() }}`` can now be used to get a list of filters and |
| 98 | tags. |
| 99 | |
Armin Ronacher | 2158091 | 2007-04-17 17:13:10 +0200 | [diff] [blame] | 100 | - the template lexer keeps not track of brace, parenthesis and |
| 101 | bracket balance in order to not break variable tags apart if they |
| 102 | are configured to look like this: ``${expr}``. This also fixes |
| 103 | the problem with nested dicts in variable expressions. |
| 104 | |
Armin Ronacher | 33d528a | 2007-05-14 18:21:44 +0200 | [diff] [blame] | 105 | - it's now possible to configure the variable blocks to look the |
| 106 | same as the block delimiters. Thus you can set the syntax to something |
| 107 | like ``{ / }`` for both blocks and variables. |
| 108 | |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 109 | - added whitespace management system for the template designer. |
| 110 | |
| 111 | - some small bugfixes. |
| 112 | |
Armin Ronacher | ee2c18e | 2007-04-20 22:39:04 +0200 | [diff] [blame] | 113 | - improved security system regarding function calls and variable |
| 114 | assignment in for loops. |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 115 | |
Armin Ronacher | 5a8e497 | 2007-04-05 11:21:38 +0200 | [diff] [blame] | 116 | - added `lipsum` function to generate random text. |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 117 | |
| 118 | - strings without unicode characters are processed as binary strings now |
| 119 | to workaround problems with `datetime.strftime` which only accepts |
| 120 | binary strings. |
| 121 | |
Armin Ronacher | 2158091 | 2007-04-17 17:13:10 +0200 | [diff] [blame] | 122 | - it's now possible to use newlines in string literals |
| 123 | |
Armin Ronacher | 40cf47c | 2007-04-04 13:50:09 +0200 | [diff] [blame] | 124 | - developer friendly traceback is now toggleable |
| 125 | |
Armin Ronacher | fb5bebc | 2007-04-27 18:24:19 +0200 | [diff] [blame] | 126 | - the variable failure is now pluggable by replacing the undefined |
| 127 | singleton for an environment instance |
Armin Ronacher | 40cf47c | 2007-04-04 13:50:09 +0200 | [diff] [blame] | 128 | |
Armin Ronacher | 5a8e497 | 2007-04-05 11:21:38 +0200 | [diff] [blame] | 129 | - fixed issue with old-style classes not implementing `__getitem__` |
| 130 | (thanks to Axel Böhm for discovering that bug) |
| 131 | |
| 132 | - added a bunch of new docstrings to the Jinja classes. Makes fun now to |
| 133 | use pydoc :-) |
| 134 | |
Armin Ronacher | 2acbac1 | 2007-04-11 21:49:48 +0200 | [diff] [blame] | 135 | - fixed severe memcaching bug. Formerly it wasn't possible to use memcaching |
| 136 | without enabling disk cache. |
| 137 | |
Armin Ronacher | d071f95 | 2007-04-13 22:32:11 +0200 | [diff] [blame] | 138 | - fixed a bug that allowed users to override the special names `_`, `true` etc. |
| 139 | |
Armin Ronacher | eec3138 | 2007-04-14 14:50:45 +0200 | [diff] [blame] | 140 | - added `batch` and `slice` filters for batching or slicing sequences |
| 141 | |
Armin Ronacher | 9bcd411 | 2007-05-29 14:17:24 +0200 | [diff] [blame] | 142 | - added `sum`, `abs`, `round` and `sort` filters. This fixes #238 |
Armin Ronacher | d071f95 | 2007-04-13 22:32:11 +0200 | [diff] [blame] | 143 | |
Armin Ronacher | 450756b | 2007-04-15 15:13:59 +0200 | [diff] [blame] | 144 | - added `striptags` and `xmlattr` filters for easier SGML/XML processing |
Georg Brandl | af31e4d | 2007-04-15 00:47:37 +0200 | [diff] [blame] | 145 | |
Armin Ronacher | 2158091 | 2007-04-17 17:13:10 +0200 | [diff] [blame] | 146 | - the trans tag does not need explicit naming for variables with the same |
| 147 | name any more. You can now use ``{% trans foo %}`` instead of the verbose |
| 148 | version ``{% trans foo=foo %}``. |
| 149 | |
| 150 | - reimplemented Buffet plugin so that it works at least for pylons |
| 151 | |
| 152 | - added `Environment.get_translations_for_string` |
| 153 | |
| 154 | - fixed a bug in the parser that didn't unescape keyword arguments. (thanks |
| 155 | to Alexey Melchakov for reporting) |
| 156 | |
Armin Ronacher | ee2c18e | 2007-04-20 22:39:04 +0200 | [diff] [blame] | 157 | - You can now use the environment to just tokenize a template. This can |
| 158 | be useful for syntax highlighting or other purposes. |
| 159 | |
Armin Ronacher | fb5bebc | 2007-04-27 18:24:19 +0200 | [diff] [blame] | 160 | - added optional C-implementation of the context baseclass. |
| 161 | |
| 162 | - you can now use optional parentheses around macro defintions. Thus it's |
| 163 | possible to write ``{% macro foo(a, b, c) %}`` instead of ``{% macro |
| 164 | foo a, b, c %}``. |
| 165 | |
| 166 | - additional macro arguments now end up in `varargs`. |
Armin Ronacher | e98c5f5 | 2007-04-21 09:39:06 +0200 | [diff] [blame] | 167 | |
Armin Ronacher | ccf284b | 2007-05-21 16:44:26 +0200 | [diff] [blame] | 168 | - implemented the `{% call %}` block. `call` and `endcall` can still be used |
| 169 | as identifiers until Jinja 1.3 |
Armin Ronacher | e98c5f5 | 2007-04-21 09:39:06 +0200 | [diff] [blame] | 170 | |
Armin Ronacher | 2f43ba4 | 2007-06-02 14:11:35 +0200 | [diff] [blame] | 171 | - it's now possible to stream templates. |
Armin Ronacher | fb5bebc | 2007-04-27 18:24:19 +0200 | [diff] [blame] | 172 | |
Armin Ronacher | 4f41711 | 2007-04-28 23:23:44 +0200 | [diff] [blame] | 173 | - fixed a corner case when defining a block inside of a condition |
| 174 | |
Armin Ronacher | ce513f2 | 2007-04-29 19:56:52 +0200 | [diff] [blame] | 175 | - the cached loader mixin is now able to cache multiple templates from |
| 176 | different loaders in the same cache folder. |
| 177 | |
| 178 | - Translatable strings returned by ``_()`` will leave their string formatting |
| 179 | signs untouched. Thanks to Stefan Ebner for reporting. |
| 180 | |
Armin Ronacher | 4965987 | 2007-05-12 23:29:33 +0200 | [diff] [blame] | 181 | - ``{% block name "data" %}`` is now an alias for |
| 182 | ``{% block name %}data{% endblock %}``. Note that the second argument can |
| 183 | be an expression. As soon as you specify an expression as second argument |
| 184 | the closing tag has to be omitted. |
| 185 | |
Armin Ronacher | 6dba4d6 | 2007-05-21 23:41:36 +0200 | [diff] [blame] | 186 | - It's now possible to iterate over iterators additionally to sequences. |
| 187 | If the iterator is inifite it will crash however, so makes sure you don't |
| 188 | pass something like that to a template! |
| 189 | |
Armin Ronacher | 9bcd411 | 2007-05-29 14:17:24 +0200 | [diff] [blame] | 190 | - added `rendetemplate` to render included templates in an isolated |
| 191 | environment and get the outout back. |
| 192 | |
| 193 | - added `simplefilter` decorator. |
| 194 | |
Armin Ronacher | 63ca721 | 2007-05-30 00:29:39 +0200 | [diff] [blame] | 195 | - improved ChoiceLoader error reporting (thanks to Bryan McLemore) |
| 196 | |
Armin Ronacher | ecc051b | 2007-06-01 18:25:28 +0200 | [diff] [blame] | 197 | - fixed extended slicing |
| 198 | |
Armin Ronacher | db69d0a | 2007-06-02 01:35:53 +0200 | [diff] [blame] | 199 | - reworked loader layer. All the cached loaders now have "private" non cached |
| 200 | baseclasses so that you can easily mix your own caching layers in. |
| 201 | |
| 202 | - added `MemcachedLoaderMixin` and `MemcachedFileSystemLoader` contributed |
| 203 | by Bryan McLemore. |
| 204 | |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 205 | |
| 206 | Version 1.0 |
| 207 | ----------- |
Armin Ronacher | ecc051b | 2007-06-01 18:25:28 +0200 | [diff] [blame] | 208 | (codename: siyutusan, released Mar 23, 2007) |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 209 | |
| 210 | - Initial release |