I am trying to write an if expression in a jinja template
{% for key in data %} {% if key is 'priority' %} <p>('Priority: ' + str(data[key])</p> {% endif %} {% endfor %}
statement I'm trying to translate into Python
if key == priority: print(print('Priority: ' + str(data[key]))
This is the error I get:
TemplateSyntaxError: expected token 'name' received by 'string'
python templates jinja2
Luisito
source share