summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-11-07 23:42:27 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-11-07 23:42:27 +0000
commitfdb3b738a8c4b5643ad3209520211b402dca95a2 (patch)
treeab7255eeee1bbe03d95652cc74a3843fa052d8ac /docs
parenta84404c190f1d3e9d507faf8031c98517c4c4466 (diff)
Fixed typo in docs/templates.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/templates.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index 46040c6972..7a580bd0db 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -473,7 +473,7 @@ block are output::
In the above, if ``athlete_list`` is not empty, the number of athletes will be
displayed by the ``{{ athlete_list|length }}`` variable.
-As you can see, the ``if`` tag can take an option ``{% else %}`` clause that
+As you can see, the ``if`` tag can take an optional ``{% else %}`` clause that
will be displayed if the test fails.
``if`` tags may use ``and``, ``or`` or ``not`` to test a number of variables or
@@ -537,11 +537,11 @@ The 'ifchanged' block tag is used within a loop. It has two possible uses.
{% ifchanged %}<h3>{{ date|date:"F" }}</h3>{% endifchanged %}
<a href="{{ date|date:"M/d"|lower }}/">{{ date|date:"j" }}</a>
{% endfor %}
-
+
2. **New in Django development version.** If given a variable, check whether that
variable has changed. For example, the following shows the date every time it
changes, but only shows the hour if both the hour and the date has changed::
-
+
{% for date in days %}
{% ifchanged date.date %} {{ date.date }} {% endifchanged %}
{% ifchanged date.hour date.date %}