#16676: The 'add' filter should stringify value or argument if the other value 
is a
string
-------------------------------------+-------------------------------------
               Reporter:  dtrebbien  |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Milestone:             |      Component:  Template system
                Version:  1.3        |       Severity:  Normal
             Resolution:             |       Keywords:
           Triage Stage:  Design     |      Has patch:  1
  decision needed                    |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

 In theory, I find it slightly better to display nothing that to display a
 wrong result. For instance, if someone adds total price and shipping cost
 with this filter (an horrible idea for sure, and a strong argument against
 the existence of the `add` filter), and accidentally has one of these
 values represented as a string, the resulting price would be wrong.

 In practice, I understand the value of preserving backwards compatibility.

 I'm attaching an alternative patch that changes the docs to match the
 code. I'm still slightly in favor of the initial patch. But what really
 matters is to resolve the inconsistency between the code and the docs, one
 way or another.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16676#comment:5>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to