﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6783	DecimalField python locale issue	Dirk Datzert <dummy@…>	nobody	"I ran into an python locale issue with the DecimalField. During INSERTs and UPDATEs invalid sql-statements are generated since a comma-seperator ',' is used for formating DecimalField instead of the expected dot-seperator '.'

decimal-python.py (for simple testing):
from django.db.models.fields import DecimalField
from locale import setlocale, LC_NUMERIC
d = DecimalField(max_digits=6, decimal_places=3)
setlocale(LC_NUMERIC,'de_DE')
print d.format_number(3.456)
setlocale(LC_NUMERIC,'en_US')
print d.format_number(3.456)

--------------------------------------------------
linux-f426d:/home/admin/django/projects # export DJANGO_SETTINGS_MODULE=ais.settings
linux-f426d:/home/admin/django/projects # python decimal-python.py              
3,456
3.456

Environment: Django-SVN
SuSE Linux Enterprise Server 10
Python 2.4.2

On my private notebook this is no issue both outputs will be
3.456
3.456
Private Environment: Django-SVN
OpenSuSe 10.3
Python 2.5.1"		new	Internationalization	dev					Unreviewed	1	0	0	0	0	0
