#30086: Document how floatformat template filter interacts with the localize
template tag
--------------------------------------+------------------------------------
     Reporter:  Meiyer                |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  1.11
     Severity:  Normal                |               Resolution:
     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 Meiyer):

 Replying to [comment:2 Marc Parizeau]:
 > this behavior goes against the principle of least astonishment

 +1
 I consider this as a bug in the implementation of the filter, even though
 the original title of the ticket was modified by Tim. Why would something
 inside a `{% localize off %}` block still keep being localised?.. I
 actually opened this ticket after having to dig through Django's code and
 adding debug statements to understand what was happening.

 Going forward, I see only two possible solutions:

 * either introduce for filters a non-breaking support for context
 (meaning, filters will be able to take context without breaking existing
 code),
 * or, deprecate the `floatformat` filter (and possibly other), replacing
 it (them) with tags.

 I personally favour the first option, but I realise it will require a lot
 of effort.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30086#comment:4>
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/067.0ec9c735a1174ab3a8db4746ce5dab5e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to