#30134: Geodjango js template should use `|safe` for float values to avoid
DECIMAL_SEPARATOR ruin the js syntax
--------------------------------+--------------------------------------
     Reporter:  Sassan Haradji  |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  GIS             |                  Version:  2.1
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  1               |      Needs documentation:  0
  Needs tests:  1               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by Sassan Haradji):

 If gis is not supposed to work with `DECIMAL_SEPARATOR` set in global
 settings file, then this is indeed a documentation issue rather than a
 bug. But I think there's room for improvement here, current behavior even
 if documented is counter intuitive, because developer doesn't know
 necessarily about internals of gis admin panel and doesn't expect setting
 `DECIMAL_SEPARATOR` to break it. Documenting this would be appropriate if
 it were some random php framework, but even if documented this behavior of
 setting some settings breaks another completely unrelated thing is not
 something I've ever seen in Django in my +9 years experience with it. I
 think what would be acceptable is one of these options:
 1. Remove/Deprecate things like `DECIMAL_SEPARATOR` in settings
 completely, if it's not something fully supported lets not have it when
 there are better alternatives that doesn't break things and do the same
 job (format files.)
 2. Support `DECIMAL_SEPARATOR` and similar settings "completely" which
 means solving the issue described in this ticket and other possible
 problems setting `DECIMAL_SEPARATOR` may cause.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30134#comment:8>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.dbecb91841bf84e14045844e1623e092%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to