From: Daniel Greenfeld Date: Thu, 6 Aug 2015 15:35:51 +0000 (-0700) Subject: Removed outdated condition section on Django X-Git-Tag: 2.9~94^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F472%2Fhead;p=thirdparty%2Fjinja.git Removed outdated condition section on Django --- diff --git a/docs/switching.rst b/docs/switching.rst index ab941245..01a7d0d7 100644 --- a/docs/switching.rst +++ b/docs/switching.rst @@ -116,37 +116,6 @@ Python syntax. Thus this Django code:: This allows you to pass variables to the method, which is not possible in Django. This syntax is also used for macros. -Conditions -~~~~~~~~~~ - -In Django you can use the following constructs to check for equality:: - - {% ifequal foo "bar" %} - ... - {% else %} - ... - {% endifequal %} - -In Jinja2 you can use the normal if statement in combination with operators:: - - {% if foo == 'bar' %} - ... - {% else %} - ... - {% endif %} - -You can also have multiple elif branches in your template:: - - {% if something %} - ... - {% elif otherthing %} - ... - {% elif foothing %} - ... - {% else %} - ... - {% endif %} - Filter Arguments ~~~~~~~~~~~~~~~~