#3406: [patch] newforms: choices checking should unicode choices list before
comparing to a value
---------------------------------+------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Resolution:
Keywords: unicode | Stage: Design decision needed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 1
---------------------------------+------------------------------------------
Comment (by [EMAIL PROTECTED]):
Michael Radziej, you seem misunderstood it.
clean() always converts value to unicode and then unicode value is
compared against list of choices and if this list is not in unicode, this
check fails. My patch converts choices list to unicode if needs just for
comparing because unicode should be compared against unicode, not
bytestrings.
And again: take a look a few lines below my patch, there is absolutely the
same code for MultipleChoiceField and it does exactly the same as my patch
does
--
Ticket URL: <http://code.djangoproject.com/ticket/3406#comment:2>
Django Code <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
-~----------~----~----~----~------~----~------~--~---