On Mon, Jan 11, 2010 at 1:02 PM, Dave Merwin wrote:
> First of all, thanks to everyone for the help!!!
>
> I'm not getting any output after the else. Nothing displays in the
> template.
>
> That is what is confusing.
>
>
"Nothing displays in the template" sounds like either there is no user
varia
First of all, thanks to everyone for the help!!!
I'm not getting any output after the else. Nothing displays in the
template.
That is what is confusing.
Dave
On Jan 11, 8:58 am, Karen Tracey wrote:
> On Mon, Jan 11, 2010 at 2:39 AM, Dave Merwin wrote:
> > I have the following:
>
> > {% for gr
On Mon, Jan 11, 2010 at 2:39 AM, Dave Merwin wrote:
> I have the following:
>
> {% for group in user.groups.all %}
>{{ group.name }}
>{% ifequal group.name "subscribed" %}
>I'm subscribed
>{% else %}
>{{ group.name }}
>{% endifequal %}
> {% endfor %}
>
> The else p
If the docs are to be believed, {% ifequal %} does provide an option
for an {% else %} clause. See
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifequal
That said, I can't tell from the code above why it would not work. But
if you are using Django dev version (post 1.1) then go for
i think ifequal does not accept an else in the statement.
Dave Merwin wrote:
> I have the following:
>
> {% for group in user.groups.all %}
> {{ group.name }}
> {% ifequal group.name "subscribed" %}
> I'm subscribed
> {% else %}
> {{ group.name }}
> {% endifequal %}
I have the following:
{% for group in user.groups.all %}
{{ group.name }}
{% ifequal group.name "subscribed" %}
I'm subscribed
{% else %}
{{ group.name }}
{% endifequal %}
{% endfor %}
The else part of the statement is not rendering. What am I missing?
Any help wel
6 matches
Mail list logo