#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):
`localize off` turns off `l10n` (look at `django/templatetags/l10n.py`) in
my case `l10n` is already turned off in my settings.
When `DECIMAL_SEPARATOR` is manually set in settings, `localize off` has
no effect on it, look at this comment copied from line 117 of
`django/utils/formats.py`:
```
# The requested format_type has not been cached yet. Try to find it in
any
# of the format_modules for the given lang if l10n is enabled. If it's
not
# there or if l10n is disabled, fall back to the project settings.
```
fall back to the project settings, means falling back to
`DECIMAL_SEPARATOR` (and other settings in its family). But just cause I
set a custom value for `DECIMAL_SEPARATOR` doesn't mean gis should break
on my django admin.
--
Ticket URL: <https://code.djangoproject.com/ticket/30134#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/065.cb67abf76f6d99a44ebb8e8df9f644b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.