Hi Wim,

Le 21 janv. 2013 à 18:01, Wim Feijen <[email protected]> a écrit :
> Actually, the current behaviour is not to reset between loops. Is that 
> intentional? 

Yes, this behavior is intentional. See Malcolm's comment (#4) on the ticket.

> A patch to ticket 5908 adds a reset_cycle tag, which resets the cycle-loop. I 
> am wondering if it is the right way to solve this problem

That's what Malcolm said, and I tend to agree with him. I'm not particularly 
excited by adding a new tag but I don't have a better idea. Something like {% 
cycle row_colors reset %} would conflict with the regular {% cycle %} syntax.

> or whether it would be better to modify cycle's current behaviour to reset 
> the loop after each endfor; or maybe if we want another kind of cycle which 
> allows for setting both options?

I don't think we could justify the backwards incompatibility for the current {% 
cycle %} tag. Besides, introducing coupling between {% cycle %} and {% for %} / 
{% endfor %} sounds like a bad idea.

-- 
Aymeric.



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to