#14101: Localized DecimalField doesn't accept localized input
----------------------------------+-----------------------------------------
Reporter: dfoerster | Owner: nobody
Status: new | Milestone:
Component: Internationalization | Version: 1.2
Keywords: localize | Stage: Unreviewed
Has_patch: 0 |
----------------------------------+-----------------------------------------
I'm having trouble with a localized form field not accepting localized
input. The form is defined like this:
{{{
class XyForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(XyForm,self).__init__(*args,**kwargs)
self.fields['betrag'].localize = True
}}}
USE_L10N is set to true and LANGUAGE_CODE to de-de. However, entering a
number with a comma as a decimal separator triggers a validation error.
(Enter a number.) I tried to dig into this and found, that from a python
shell started with manage.py the get_language() function from
utils.translation returns 'en-us' instead of the configured 'de-de'.
--
Ticket URL: <http://code.djangoproject.com/ticket/14101>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.