increment a variable in django templates
Posted
by Hulk
on Stack Overflow
See other posts from Stack Overflow
or by Hulk
Published on 2010-03-24T11:43:18Z
Indexed on
2010/03/24
11:53 UTC
Read the original article
Hit count: 720
All,
How Can we increment a value like the following in django templates,
{{ flag =0 }}
{% for op in options %}
{{op.choices}}<input type="radio" name="template" id="template" value="template{{flag++}}"/>
{% endfor %}
thanks..
© Stack Overflow or respective owner