#25118: add template filter doesn't work with mixed types
--------------------------------------+------------------------------------
     Reporter:  dvinegla              |                    Owner:  kswiat
         Type:  Cleanup/optimization  |                   Status:  closed
    Component:  Template system       |                  Version:  1.8
     Severity:  Normal                |               Resolution:  wontfix
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by chadhs):

 This seems to not be a bug.  I did some simple tests to confirm the
 behavior is consistent with the documentation.

 The add filter correctly concats strings.
 It also correctly coerces a string to an int adding allowing it to be
 added to a subsequent int.
 Two ints are also correctly added.
 Lastly a string like my name fails to be coerced to an int and when added
 to an int returns an empty value.

 Once again, this is consistent with the docs.  Thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/25118#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5754d957fb5e27153339e41e36a97ff3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to