Re: enumerate in templates

2008-12-29 Thread James Bennett
On Mon, Dec 29, 2008 at 3:02 AM, Vicky wrote: > command like below is not working... can u suggest a way?? It is very, very, very, very important to read the big warning at the top of the template documentation, which states that the Django template language *is not* just

Re: enumerate in templates

2008-12-29 Thread Vicky
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 wrote: > ya that's what i need :) thanks a lot :) :) > > On Dec 28, 8:06 pm, Daniel Roseman

Re: enumerate in templates

2008-12-28 Thread Vicky
ya that's what i need :) thanks a lot :) :) On Dec 28, 8:06 pm, Daniel Roseman wrote: > On Dec 27, 6:20 am, Vicky wrote: > > > Is there a way to access the previous value of a for loop in > > templates. Can anyone tell the template

Re: enumerate in templates

2008-12-28 Thread Daniel Roseman
On Dec 27, 6:20 am, Vicky 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

Re: enumerate in templates

2008-12-27 Thread Alex Koshelev
{% for %} itself On 12/27/08, Vicky 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): >