command like below is not working... can u suggest a way??
{% for node in nodes %} {% ifequal nodes[(forloop.counter0)-1].node_type '2' %} On Dec 29, 9:21 am, Vicky <vicky87....@gmail.com> wrote: > ya that's what i need :) thanks a lot :) :) > > On Dec 28, 8:06 pm, Daniel Roseman <roseman.dan...@googlemail.com> > wrote: > > > On Dec 27, 6:20 am, Vicky <vicky87....@gmail.com> wrote: > > > > Is there a way to access the previous value of a for loop in > > > templates. Can anyone tell the template representation for the python > > > code like: > > > > for i,j in enumerate(item): > > > ... > > > I think the various forloop variables are what you want. > > > {% for j in item %} > > {{ forloop.counter0 }} > > {% endfor %} > > > See :http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for > > -- > > DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---