I am new to Jinja and I having problems with template html if statements.
My file looks like this:
<!DOCTYPE html>
<head>
<title>RELE:Current Status</title>
<head>
<body>
<h1>Device Status and Controls</h1>
{% for control in controls %}
<p>The {{ controls[control].name }}
{% if control == 1 %}
is currently {{ controls[control].value }}
{% elif (control == 2 and ({{ controls[control].value }}) == 0) : %}
....
I get an error in the last statement:
Template Syntax Error : expected token ':', got '}'
Can anyone tell me what am I doing wrong? I assumed that Jinja follows the
same syntax as Python in the if statements.
Thanks,
Victor
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/groups/opt_out.