On Mon, 2006-09-11 at 02:07 +0000, Martin wrote:
> 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...

Providing the "as <name>" part if optional, I don't see any harm in this
and I agree that it could be useful in some circumstances.

Make a patch and assign it to me (mtredinnick). I'm going to spend some
time attacking tickets next week; ones assigned to me get attention
first.

Regards,
Malcolm



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

Reply via email to