#16927: Documentation for ifchanged misleading
--------------------------------------+-------------------------------
 Reporter:  sebastian                 |          Owner:  nobody
     Type:  Bug                       |         Status:  new
Milestone:                            |      Component:  Documentation
  Version:  SVN                       |       Severity:  Normal
 Keywords:  ifchanged, documentation  |   Triage Stage:  Unreviewed
Has patch:  1                         |  Easy pickings:  1
    UI/UX:  0                         |
--------------------------------------+-------------------------------
 The multi-argument version of the template tag `ifchanged` checks if any
 of the given variable has changed, and if so, it displays the content.
 However, the current documentation for this case, in the form of an
 example, says:

   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: […]

 This is misleading in so far as the wrong logical operation is described.
 The tag `ifchanged` shows its contents if variable 1 OR variable 2 OR …
 has changed, not AND-ing the variables. A more accurate version of the
 documenting example might be:

   For example, the following shows the date every time it changes, while
 showing the hour if either the hour or the date has changed: […]

 This makes more sense anyway, since e.g. in a schedule list of dates and
 hours, we typically want to have the hour appear either if the date is the
 same and the hour changed, or the date changed. This is accomplished by
 the tag `ifchanged` right now, the documentation should reflect this.

 I am attaching a patch for the suggested change. This also includes making
 the wording right before the quoted text more explicit, with regard to the
 fact that more than one variable can be given to `ifchanged`. Please check
 spelling and wording and make changes as appropriate since I am not a
 native speaker.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16927>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
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.

Reply via email to