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 <neerash...@gmail.com> 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 django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > 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 django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.