2👍
✅
You are not closing the if
template tag correctly. You are closing with }
, whereas it needs %}
.
Try this:
{% for letter in "ABCD"|make_list %}
{% if letter == 'A' or letter == 'D' %}
Yes
{% else %}
No
{% endif %}
{% endfor %}
Source:stackexchange.com