Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#16404 closed Cleanup/optimization (fixed)

intcomma & thousand separator

Reported by: grepsd@… Owned by: Grepsd
Component: contrib.humanize Version: master
Severity: Release blocker Keywords:
Cc: Grepsd Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The intcomma template filter from the humanize package isn't doing the thousand separating if you're not setting the USE_THOUSAND_SEPARATOR to True.

If you set the USE_THOUSAND_SEPARATOR, every number display in the template is processed, so the intcomma won't change that.

The intcomma should do the thousand separating without relying on the USE_THOUSAND_SEPARATOR setting.

NB : intcomma is calling number_format which is calling numberformat.format.

(from rev: 16168)

Attachments (1)

diff_django_humanize_fix.diff (2.3 KB) - added by grepsd@… 5 years ago.
fix the humanize.intcomma template filter to force the use of grouping in the number_format.format method.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by Bernhard Essl

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

I agree with you that is confusing.

Changed 5 years ago by grepsd@…

fix the humanize.intcomma template filter to force the use of grouping in the number_format.format method.

comment:2 Changed 5 years ago by Grepsd

Cc: Grepsd added
Has patch: set
Owner: changed from nobody to Grepsd
Version: 1.3SVN

comment:3 Changed 5 years ago by Jannis Leidel

Component: Template systemcontrib.humanize
Needs tests: set
Patch needs improvement: set
Triage Stage: Design decision neededAccepted

comment:4 Changed 5 years ago by anonymous

Severity: NormalRelease blocker

Behavior is a regression from previous release, therefore release blocker.

comment:5 Changed 5 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [16726]:

Fixed #16404 -- Fixed a regression in the localization changes in the humanize app made in r16168. Thanks, grepsd@….

comment:6 Changed 5 years ago by Karen Tracey

In [16736]:

Add a test for the intcomma regression described in #16404/#16562, fixed in r16726. Refs #16404.

Note: See TracTickets for help on using tickets.
Back to Top