I think you might want the heading outside the loop:
My Heading
{% for val in data %}
{% ifnotequal val 2 %}
{{val}}
{% endifnotequal %}
{% endfor %}
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discus
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]
Ex
2 matches
Mail list logo