Sunday, January 10, 2010

If Statements inside For Loops

I have the following:

{% for group in user.groups.all %}
{{ group.name }}
{% ifequal group.name "subscribed" %}
<h1>I'm subscribed</h1>
{% else %}
{{ group.name }}
{% endifequal %}
{% endfor %}

The else part of the statement is not rendering. What am I missing?
Any help welcome.

Thanks,
Dave

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate