#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                     
---------------------------------+------------------------------------------
Changes (by Michael Radziej <[EMAIL PROTECTED]>):

  * keywords:  => unicode
  * needs_better_patch:  => 1
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 1
  * needs_docs:  => 0

Comment:

 Oh, yet another unicode bug ;-)
 
 Hmm, since newforms is unicode country, I guess this is the wrong fix.
 formfield.choices should contain unicode strings, not bytestrings. IMHO,
 the bug is rather in {{{ formfield() }}} (probably {{{
 ForeignKey.formfield() }}}), it should decode the options to unicode
 during formfield construction, using {{{ settings.DEFAULT_CHARSET }}} as
 encoding. Can you please specify how you created the ChoiceField?
 
 A unit test would be great (it's needed anyway, no matter how this turns
 out).
 
 But I leave this to Adrian --> decision needed.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3406#comment:1>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to