#26890: forms.IntegerField does not support unicode numbers
-------------------------------+--------------------------
Reporter: byoungb | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.9
Severity: Normal | Keywords: IntegerField
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------
A Japanese user on our site just tried to submit a form with u'50'
Python's int() function correctly handles it (as well as python's \d+ in
regular expressions).
But in IntegerField's to_python the value is cast to a string before being
run through a regex substitution to remove ".00000" .
I found a quick workaround I changed it to forms.FloatField and then I
cast to an int in the clean_XXX function. (it is just for page number in
my case so I don't care if it auto truncates/rounds)
--
Ticket URL: <https://code.djangoproject.com/ticket/26890>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.880af11dc094d06bd89140a78704138e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.