#34543: Thousand separator breaking templates
-------------------------------------+-------------------------------------
Reporter: Pablo Riquelme | Owner: nobody
Type: Bug | Status: closed
Component: | Version: 4.2
Internationalization |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
thousand_separator,thousand,separator,spanish| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Pablo Riquelme):
In my settings I use across Django 4.1 and 4.2.
USE_I18N = True
USE_L10N = True
LANGUAGE_CODE = 'es-CL'
USE_THOUSAND_SEPARATOR = True
THOUSAND_SEPARATOR = '.'
TIME_ZONE = 'America/Santiago'
In Django 4.1 I call a model using the model.object.get(), the model has
int_value= models.IntegerField(default=0)
then I return the object to the template to show it on screen.
In my templates I call it with
Value ${{obj.int_value}}
For example, one object has int_value 15340
In the template with django up to 4.1.9, it shows "Value $15.340", the
format that i want it.
In the template with django 4.2 and 4.2.1 it shows "Value $15 340", with
the blank space instead of the dot as thousand_separator.
Django will ignore my settings of the Thousand Separator that I declared
on my settings.py, it might be that in all of this time, the setting was
ignores but de default thousand separator was the dot, until the commit
that i linked on the original ticket when it changed to a blank space.
If i change the Setting `USE_I18N` and/or `USE_L10N` and keep the other
settings intact, the only impact is that the number will lose the thousand
separator and the language of the app.
--
Ticket URL: <https://code.djangoproject.com/ticket/34543#comment:3>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070187ed17f8a4-24f37e18-d4f2-4d15-82e3-3b1fda8305dd-000000%40eu-central-1.amazonses.com.