> I can't really imagine that this situation is all that common. I'm not
> saying it's never used, but the barrier is a bit higher than just "more
> than one person uses this".
Maybe it's just me, but in all 3 projects I have faced with django so
far I have had to work around this, the most usual
On Mon, 2009-01-26 at 16:16 -0200, Santiago Perez wrote:
> Hi, I found myself needing to reference the previous or next element
> of a list within a for loop of a template.
> I think it would be pretty easy to implement the following extra
> members to the forloop context variable:
[snip]
Though
On Mon, 2009-01-26 at 16:16 -0200, Santiago Perez wrote:
> Hi, I found myself needing to reference the previous or next element
> of a list within a for loop of a template.
> I think it would be pretty easy to implement the following extra
> members to the forloop context variable:
>
> + forloop
I have also needed this in the past and just hacked the forloop code
to provide the variables. I can make a patch available with a couple
of tests if there is interest in including this.
On Mon, Jan 26, 2009 at 2:55 PM, Tim Chase
wrote:
>
> Santiago Perez wrote:
>> Hi, I found myself needing to
Santiago Perez wrote:
> Hi, I found myself needing to reference the previous or next
> element of a list within a for loop of a template. I think it
> would be pretty easy to implement the following extra members
> to the forloop context variable:
>
> + forloop.next_element
> + forloop.next_coun
Hi, I found myself needing to reference the previous or next element
of a list within a for loop of a template.
I think it would be pretty easy to implement the following extra
members to the forloop context variable:
+ forloop.next_element
+ forloop.next_counter
+ forloop.next_counter0
+ for