I am new to Jinja2 and use it as part of Flask. I have two statements below. One with an βinβ works. One who is "equal" does not. The equals version receives the syntax error shown below. Iβm curious why, as it is written, the equal version, itβs at least easier for me to read.
{% if "SN" in P01["type"] %} {% include 'sn.html' %} {% endif %} {% if P01["type"] equals "SN" %} {% include 'sn.html' %} {% endif %}
Error message from jinja2.exceptions.TemplateSyntaxError
TemplateSyntaxError: expected token 'end of statement block', received 'equals'
Thanks.
python if-statement jinja2
TimothySwieter
source share