http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#add
There is loop.counter and loop.counter0. loop.counter starts from 1,
and loop.counter0 starts from 0. The 3rd time through a for loop
loop.counter is 3 and loop.counter0 is 2.
If you want to add things try something li
On 18 January 2011 15:46, Konrad Delong wrote:
> On 18 January 2011 15:02, Thomas wrote:
>>
>> Am 18.01.2011 um 14:53 schrieb GD:
>>
>>>
>>> Hi everyone,
>>> Is there a way to do simple loop counter manipulation within the
>>> template? I.e something along the lines of:
>>>
>>> {% for x in a
On 18 January 2011 15:02, Thomas wrote:
>
> Am 18.01.2011 um 14:53 schrieb GD:
>
>>
>> Hi everyone,
>> Is there a way to do simple loop counter manipulation within the
>> template? I.e something along the lines of:
>>
>> {% for x in a %}
>> loop number = {{forloop.counter +1}}
>> {% endfo
Am 18.01.2011 um 14:53 schrieb GD:
>
> Hi everyone,
> Is there a way to do simple loop counter manipulation within the
> template? I.e something along the lines of:
>
> {% for x in a %}
> loop number = {{forloop.counter +1}}
> {% endfor %}
>
> with the intention of
>
> 2
> 3
> 4
> ..
Hi everyone,
Is there a way to do simple loop counter manipulation within the
template? I.e something along the lines of:
{% for x in a %}
loop number = {{forloop.counter +1}}
{% endfor %}
with the intention of
2
3
4
as output. I realise the above doesn't work, but is there any
5 matches
Mail list logo