                  {% ifchanged %}<h3>{{ date|date:"F" }}</h3>{% endifchanged %}
                  <a href="{{ date|date:"M/d"|lower }}/">{{ date|date:"j" }}</a>
              {% endfor %}
  
      2. 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 have changed::
  
              {% for date in days %}
                  {% ifchanged date.date %} {{ date.date }} {% endifchanged %}
                  {% ifchanged date.hour date.date %}
                      {{ date.hour }}
 
</s> remove        displays the content if it has changed. For example, this displays a list of
       days, only displaying the month if it changes::
 </s> add        displays the content if it has changed. For example, this displays a
       list of days, only displaying the month if it changes:: </s> remove     of the block are output:

    ::
 </s> add     of the block are output:: </s> remove     # Note: This returns the exact same node on each {% cycle name %} call; that
    # is, the node object returned from {% cycle a b c as name %} and the one
    # returned from {% cycle name %} are the exact same object.  This shouldn't
    # cause problems (heh), but if it does, now you know.
 </s> add     # Note: This returns the exact same node on each {% cycle name %} call;
    # that is, the node object returned from {% cycle a b c as name %} and the
    # one returned from {% cycle name %} are the exact same object.  This
    # shouldn't cause problems (heh), but if it does, now you know. </s> remove     ``if`` tags do not allow ``and`` and ``or`` clauses with the same
    tag, because the order of logic would be ambigous. For example,
    this is invalid::
 </s> add     ``if`` tags do not allow ``and`` and ``or`` clauses with the same tag,
    because the order of logic would be ambigous. For example, this is
    invalid:: </s> remove     Cycle among the given strings each time this tag is encountered
 </s> add     Cycles among the given strings each time this tag is encountered.
    2. 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 have changed::
                  {% ifchanged %}<h3>{{ date|date:"F" }}</h3>{% endifchanged %}
                  <a href="{{ date|date:"M/d"|lower }}/">{{ date|date:"j" }}</a>
              {% endfor %}
  
    2. 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 have changed::
    2. 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 have changed::
    2. 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 have changed::
  
              {% for date in days %}
                  {% ifchanged date.date %} {{ date.date }} {% endifchanged %}
                  {% ifchanged date.hour date.date %}
                      {{ date.hour }}
keep keep keep keep replace replace replace keep keep keep keep keep
 Style and import fixes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6641 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/template/defaulttags.py