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
|
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
Allow localize to handle long values