Author: russellm
Date: 2009-04-16 08:28:16 -0500 (Thu, 16 Apr 2009)
New Revision: 10569
Modified:
django/branches/releases/1.0.X/docs/ref/templates/builtins.txt
Log:
[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.
Modified: django/branches/releases/1.0.X/docs/ref/templates/builtins.txt
===================================================================
--- django/branches/releases/1.0.X/docs/ref/templates/builtins.txt
2009-04-16 13:27:46 UTC (rev 10568)
+++ django/branches/releases/1.0.X/docs/ref/templates/builtins.txt
2009-04-16 13:28:16 UTC (rev 10569)
@@ -330,6 +330,19 @@
{% 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---