Le 01/11/2012 14:38, Dimitris Leventeas a écrit :
In other words, is it possible between a recursive call of a loop to
have another loop? If I try it, I get an error:
TypeError: Tried to call non recursive loop. Maybe you forgot the
'recursive' modifier.
Hi,
The `loop` name (unless you re-bind it yourself) is always for the
inner-most loop.
Here you want to recurse the outer loop, so you need to rebind the outer
value of the `loop` variable:
Between the two {% for ... %} tags:
{% set outer_loop = loop %}
Recursion:
{{ outer_loop(va.items()) }}
Cheers,
--
Simon Sapin
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en.