Hey Mr. Django! I am trying to have different information display in
the same block depending on a variable "choice" which is simply an
int. The way I was planning on doing so was going to be something like
the bellow code:

{% extends "index.html"%} {%block head%}

Welcome to Piss && ink {{user}}

{%endblock head%}
{%block one%}
The temperature in {{city}} is {{temperature}}&deg

{%endblock one%} {%if choice1 == 2 %} {%block two%}
The temperature in {{city}} is {{temperature}}&deg

{%endblock two%} {% endif %} {%comment%}{%if choice1 == 2 %} {%block
two%}
The temperature in {{city}} is {{temperature}}&deg

{%endblock%} {% endif %}{%endcomment%} {%block two%} {%csrf_token%} {%
if new_event %}
{{new_event}}

{% endif %} {%endblock%}
Now, the problem I am having is that the template doesn't like that
there are two blocks of the same name in the template. For some reason
it doesn't seem to care about the {%if%} statement that is checking
where the {%block%} is supposed to go. I thought that the {%if%}
statement would only execute what was inside itself depending on its
parameters but it doesn't seem to be doing that. It displays
everything inside the {%if%} no matter what "choice1" is equal too :
( Does anyone have any idea how I might be able to fix this? Thanks

-- 
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.

Reply via email to