Ticket #16927: ifchanged-doc-r16901.patch
File ifchanged-doc-r16901.patch, 901 bytes (added by , 13 years ago) |
---|
-
django/template/defaulttags.py
949 949 <a href="{{ date|date:"M/d"|lower }}/">{{ date|date:"j" }}</a> 950 950 {% endfor %} 951 951 952 2. If given a variable, check whether thatvariable has changed.953 For example, the following shows the date every time it changes, but954 only shows the hour if both the hour and the date havechanged::952 2. If given one or more variables, check whether any variable has changed. 953 For example, the following shows the date every time it changes, while 954 showing the hour if either the hour or the date has changed:: 955 955 956 956 {% for date in days %} 957 957 {% ifchanged date.date %} {{ date.date }} {% endifchanged %}