#10366: model for MultipleChoiceField
------------------------------------------+---------------------------------
 Reporter:  ctao                          |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  SVN       
 Keywords:  Field choices                 |       Stage:  Unreviewed
Has_patch:  1                             |  
------------------------------------------+---------------------------------
 Ref: db/models/fields/__init__.py

 class Field(object) has init with {{{choices=None}}}. It would be good to
 have a {{{multi_choices=None}}}

 def formfield has code {{{ form_class = forms.TypedChoiceField }}}. So It
 would be like the follows:

 {{{
             if self.multi_choices:
                 form_class = forms.MultipleChoiceField
             else:
                 form_class = forms.TypedChoiceField
 }}}

 The minimum code change can deal with model to form with
 MultipleChoiceField. It worked nicely.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10366>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to