That's because list have no attribute "forloop". forloop is for use inside a
{% for ... %}
tag, where
{{ forloop.counter0 }}
works just fine.
On Fri, Jul 23, 2010 at 1:30 PM, ydjango <[email protected]> wrote:
> I tried {{labels.forloop.counter0}} . It did not work. where labels
> is a list.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" 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-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en.