Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Sam Walters
Hey Block tags dont work like that. {%if choice1 == 2 %} {% include "sometemplate.html" %} {%endif%} instead of: {%if choice1 == 2 %} {%block two%} > The temperature in {{city}} is {{temperature}} > > {%endblock two%} {% endif %} I hope that was what you were thinking...

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Russell Keith-Magee
> On Mon, Apr 4, 2011 at 7:34 PM, Ethan Yandow wrote: >> 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 >>

Re: Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Calvin Spealman
Just put the condition inside the block. On Mon, Apr 4, 2011 at 7:34 PM, Ethan Yandow wrote: > 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

Using the same block in a django template to display different information depending on a variable

2011-04-04 Thread Ethan Yandow
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}}