Skip to content
Myr

Removed outdated condition section on Django

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Greenfeld · committed by Daniel Greenfeld · parent 57c288c · Browse files · 1 file+0 added−31 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−31 removed

  • other:+0 added−31 removed

1 file+0 added−31 removed

modified:docs/switching.rst-31 removed
114 unmodified lines
115116This allows you to pass variables to the method, which is not possible in117Django. This syntax is also used for macros.118119Conditions120~~~~~~~~~~121122In Django you can use the following constructs to check for equality::123124 {% ifequal foo "bar" %}125 ...126 {% else %}127 ...128 {% endifequal %}129130In Jinja2 you can use the normal if statement in combination with operators::131132 {% if foo == 'bar' %}133 ...134 {% else %}135 ...136 {% endif %}137138You can also have multiple elif branches in your template::139140 {% if something %}141 ...142 {% elif otherthing %}143 ...144 {% elif foothing %}145 ...146 {% else %}147 ...148 {% endif %}149119Filter Arguments120~~~~~~~~~~~~~~~~121122Jinja2 provides more than one argument for filters. Also the syntax for
104 unmodified lines