From 10d4094b86721da690fcb3c9bc89b7a0089dfd5c Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 20 Mar 2010 15:26:41 +0000 Subject: Fixed #13054 - Only apply grouping to integer part of numbers if explicitly wanted. Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12816 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/numberformat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils') diff --git a/django/utils/numberformat.py b/django/utils/numberformat.py index 78ecb2fbdb..129c27f4da 100644 --- a/django/utils/numberformat.py +++ b/django/utils/numberformat.py @@ -30,7 +30,7 @@ def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''): dec_part = dec_part + ('0' * (decimal_pos - len(dec_part))) if dec_part: dec_part = decimal_sep + dec_part # grouping - if settings.USE_THOUSAND_SEPARATOR and grouping: + if settings.USE_L10N and settings.USE_THOUSAND_SEPARATOR and grouping: int_part_gd = '' for cnt, digit in enumerate(int_part[::-1]): if cnt and not cnt % grouping: -- cgit v1.3