#3442: ChoiceField should allow for nested choice sets
----------------------------------+-----------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian         
     Status:  new                 |            Component:  django.newforms
    Version:  SVN                 |           Resolution:                 
   Keywords:                      |                Stage:  Accepted       
  Has_patch:  0                   |           Needs_docs:  0              
Needs_tests:  0                   |   Needs_better_patch:  0              
----------------------------------+-----------------------------------------
Changes (by [EMAIL PROTECTED]):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 Do you really need a new `GroupedChoiceField` for this?  For validation
 purposes, it's entirely identical (the grouping doesn't affect the HTML
 `value` at all).  All you need is a way to provide grouping for rendering.
 As `ChoiceField` uses `Select` as a default widget, this could be done by
 addding a `GroupedSelect` that handles the grouping (either as a mapping
 of `group-label => input-value` or the other way around).
 
 I'll work on a patch for this... it seems like unnecessary duplication to
 have a separate `Field`.

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