Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14053 closed (fixed)

django.utils.formats.localize() misses support for long

Reported by: David Danier <david.danier@…> Owned by: nobody
Component: Internationalization Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Seems like the isinstance(value, (decimal.Decimal, float, int))-check on line 83 fails to check for long values.

Simple test (german, USE_THOUSAND_SEPARATOR is True):

In [1]: from django.utils import formats

In [2]: formats.localize(10000)
Out[2]: u'10,000'

In [3]: formats.localize(10000L)
Out[3]: 10000L

Patch follows

Attachments (1)

django_localize_long_r13459.diff (577 bytes ) - added by David Danier <david.danier@…> 14 years ago.
Allow localize to handle long values

Download all attachments as: .zip

Change History (5)

by David Danier <david.danier@…>, 14 years ago

Allow localize to handle long values

comment:1 by David Danier <david.danier@…>, 14 years ago

Has patch: set

comment:2 by Thejaswi Puthraya, 14 years ago

Component: UncategorizedInternationalization

comment:3 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [13920]) Fixed #14053 -- Also localize long integers. Thanks, David Danier.

comment:4 by Jannis Leidel, 14 years ago

(In [13921]) [1.2.X] Fixed #14053 -- Also localize long integers. Thanks, David Danier.

Backport from trunk (r13920).

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