Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16404 closed Cleanup/optimization (fixed)

intcomma & thousand separator

Reported by: grepsd@… Owned by: Grepsd
Component: contrib.humanize Version: dev
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@… 13 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 by Bernhard Essl, 13 years ago

Triage Stage: UnreviewedDesign decision needed

I agree with you that is confusing.

by grepsd@…, 13 years ago

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

comment:2 by Grepsd, 13 years ago

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

comment:3 by Jannis Leidel, 13 years ago

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

comment:4 by anonymous, 13 years ago

Severity: NormalRelease blocker

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

comment:5 by Jannis Leidel, 13 years ago

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 by Karen Tracey, 13 years ago

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