From: Armin Ronacher Date: Mon, 19 May 2008 07:25:57 +0000 (+0200) Subject: improved thread safety of the LRUCache and fixed a bug in for loops X-Git-Tag: 2.0rc1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2244881cd7f57c4436095e54675fb1da9446d8d;p=thirdparty%2Fjinja.git improved thread safety of the LRUCache and fixed a bug in for loops --HG-- branch : trunk --- diff --git a/docs/switching.rst b/docs/switching.rst index 98303fe7..f521f082 100644 --- a/docs/switching.rst +++ b/docs/switching.rst @@ -79,6 +79,10 @@ instead. Includes no longer import macros and variable assignments, for that the new `import` tag is used. This concept is explained in the :ref:`import` documentation. +Another small change happened in the `for`-tag. The special loop variable +doesn't have a `parent` attribute, instead you have to alias the loop +yourself. See :ref:`accessing-the-parent-loop` for more details. + Django ------ diff --git a/docs/tricks.rst b/docs/tricks.rst index 051c6fa5..566575e5 100644 --- a/docs/tricks.rst +++ b/docs/tricks.rst @@ -79,3 +79,22 @@ sense to defined a default for that variable:: {% endfor %} ... + +.. _accessing-the-parent-loop: + +Accessing the parent Loop +------------------------- + +The special `loop` variable always points to the innermost loop. If it's +desired to have access to an outer loop it's possible to alias it:: + + + {% for row in table %} + + {% set rowloop = loop %} + {% for cell in row %} +