Re: Could not parse the remainder: '{{variabile}}' from '{{variabile}}'

2014-01-08 Thread Larry Martell
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

Re: Could not parse the remainder: '{{variabile}}' from '{{variabile}}'

2014-01-08 Thread Jonathan Baker
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

Could not parse the remainder: '{{variabile}}' from '{{variabile}}'

2014-01-08 Thread luca72
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