I need to show the heading only one time when forloop executed along
with if-loop;
example:
-
data.html
--
{% for val in data %}
{% ifnotequal val 2 %}
My Heading
{{val}}
{% endifnotequal %}
{% endfor %}
Input
data=[1,2,3,4,5,2,6]
Excepted Out put:
---
My heading
1
3
4
5
6
Here "My Heading" shouldn't repeat and it should occur one time. We
can't use forloop.counter/first, since we have a if-loop condition .
Pl let me know how to implement it.
Thanks & Regards,
Jai
--
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.