Hi,
I was wondering if there is a particular reason why the current value
of a `named` cycle is not exported into the context so that it is
accessable later in the tamplate as variable as well?
Fore example:
{% for obj in object_list %}
<tr class="{% cylce gb1,gb2 as background %}">
[....]
</tr>
{% if obj.need_second_row %}
<tr class="{{ background }}">
[....]
</tr>
{% endif %}
The changes to the cycle tag are very simple... The only problem I see
is that the context will get `poluted` with the new variable, but since
the name of the variable is selected by the user, this shouldn't be a
bug issue...
Or do I miss something and this could be done in a different way?
If not, I shoudl I go ahead and create a ticked and attach a patch?
Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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/django-developers
-~----------~----~----~----~------~----~------~--~---