#21544: Problem with number format when not using L10N -------------------------------+---------------------------------------- Reporter: yceruto@… | Owner: Yonel Ceruto Type: Bug | Status: new Component: Utilities | Version: master Severity: Normal | Resolution: Keywords: number format | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------+---------------------------------------- Changes (by shai):
* status: closed => new * resolution: wontfix => * stage: Unreviewed => Accepted Comment: Important points from discussion: The documentation for USE_THOUSAND_SEPARATOR implies that it only has effect when USE_L10N is on, and current behavior is correct. The documentation for NUMBER_GROUPING and THOUSAND_SEPARATOR says (on each of them): Note that if USE_L10N is set to True, then the locale-dictated format has higher precedence and will be applied instead. implying that when USE_L10N is False, the values should be used, and the submitter is correct. So it seems like the documentation is not entirely consistent, and at the very least it should be clarified. One way to interpret the documentation consistently is: USE_THOUSAND_SEPARATOR is a sort of partial override, indicating that NUMBER_GROUPING and THOUSAND_SEPARATOR should be used even though USE_L10N is on -- in that case the submitter is probably correct, and the line he refers to should be changed from {{{#!python use_grouping = settings.USE_L10N and settings.USE_THOUSAND_SEPARATOR }}} to {{{#!python use_grouping = (not settings.USE_L10N) or settings.USE_THOUSAND_SEPARATOR }}} Either way, marking as accepted as there clearly is a discrepancy between the code and parts of the documentation. Something needs to be fixed. -- Ticket URL: <https://code.djangoproject.com/ticket/21544#comment:10> 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/075.cb314bd80b1af547f81a3ee3753e6030%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.