Awesome!

Thanks Simon, it worked perfectly fine!

Maybe a clarification in the documentation (that it always refers to the
inner-most loop no matter where you have put the keyword recursive) would
help.

Cheers,
Dimitris


On Thu, Nov 1, 2012 at 3:10 PM, Simon Sapin <[email protected]> wrote:

> 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 pocoo-libs+unsubscribe@**
> googlegroups.com <pocoo-libs%[email protected]>.
> For more options, visit this group at http://groups.google.com/**
> group/pocoo-libs?hl=en <http://groups.google.com/group/pocoo-libs?hl=en>.
>
>


-- 
Dimitris Leventeas
http://n.ethz.ch/~dlevente/

-- 
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.

Reply via email to