If statement
- Answer
{% if option1 %}
<p>This is first option</p>
{% elif option2 %}
<p>not first, but second option</p>
{% else %}
<p>no matches </p>
{% endif %}
This question is one of 13 in Django template tags and filters. Test yourself on all of them.
Practice quiz FlashcardsLog in to add an explanation.
Advertisement