Quiz: Jinja
Test your knowledge of Jinja.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
Which template compiles as follows?
Bob is awake! Play with him.
A.
{{ set bob_asleep=False }}
{{ if bob_asleep }}
Shhh, don't make noise! Bob is asleep.
{{ else }}
Bob is awake! Play with him.
{{ endif }}
B.
{%- set bob_asleep=False %}
{%- if bob_asleep %}
Shhh, don't make noise! Bob is asleep.
{% else -%}
Bob is awake! Play with him.
C.
{%- set bob_asleep=False %}
{%- if bob_asleep %}
Shhh, don't make noise! Bob is asleep.
{% else -%}
Bob is awake! Play with him.
{% endif %}
D.
{%- set bob_asleep=True %}
{%- if bob_asleep %}
Shhh, don't make noise! Bob is asleep.
{% else -%}
Bob is awake! Play with him.
{% endif %}
1 / 5