Skip to content

Commit

Permalink
Merge pull request #472 from pydanny/pydanny-update-django-switch-docs
Browse files Browse the repository at this point in the history
Remove conditions segment of Django section
  • Loading branch information
untitaker committed Aug 6, 2015
2 parents 57c288c + ff4ffde commit 50c6cd7
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions docs/switching.rst
Expand Up @@ -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
~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 50c6cd7

Please sign in to comment.