On Wed, Jan 8, 2014 at 9:33 AM, luca72 wrote:
> hello the views file is like:
>
> def test(request):
>testo = ["a","b"]
>titolo = 'test'
>variabile = 'one'
>return render_to_response('vini.html',{'testo':testo,'titolo':titolo,
> 'testo':testo,'variabile':variabile,})
>
> the templa
When referencing a context variable within an if statement in a template,
you don't need to use {{ var }}. Simply use: {% if variabile == "one"
%}...{% elif variable == "two" %}...{% else %}...{% endif %}.
JDB
On Wed, Jan 8, 2014 at 9:33 AM, luca72 wrote:
> hello the views file is like:
>
> de
hello the views file is like:
def test(request):
testo = ["a","b"]
titolo = 'test'
variabile = 'one'
return render_to_response('vini.html',{'testo':testo,'titolo':titolo,
'testo':testo,'variabile':variabile,})
the template is:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
3 matches
Mail list logo