Commit c89bf435 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.0.X] Fixed #10704 -- Resurrected documentation for {% else %} clause on {%...

[1.0.X] Fixed #10704 -- Resurrected documentation for {% else %} clause on {% ifchanged %}, lost during docs refactor. Thanks to Tarken for the report.

Merge of r10563 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent b8abb9b8
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -330,6 +330,19 @@ The 'ifchanged' block tag is used within a loop. It has two possible uses.
            {% endifchanged %}
        {% endfor %}

The ``ifchanged`` tag can also take an optional ``{% else %}`` clause that
will be displayed if the value has not changed::

        {% for match in matches %}
            <div style="background-color:
                {% ifchanged match.ballot_id %}
                    {% cycle red,blue %}
                {% else %}
                    grey
                {% endifchanged %}
            ">{{ match }}</div>
        {% endfor %}

.. templatetag:: ifequal

ifequal