#31262: Support dictionaries in Field.choices for named groups.
-------------------------------------+-------------------------------------
     Reporter:  Tom Forbes           |                    Owner:  Tom
                                     |  Forbes
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tom Forbes):

 Do we want to support this as an additional way to define choices or make
 it the preferred way? Even for non-grouped choices I think it looks
 better:


 {{{
     YEAR_IN_SCHOOL_CHOICES = {
         'FR': 'Freshman',
         'SO': 'Sophomore',
         'JR': 'Junior',
         'SR': 'Senior',
         'GR': 'Graduate',
     }
 }}}

 I can either replace the current examples with the dictionary syntax and
 include a note that you can also pass a list of tuples as well, or do it
 the other way round. Or just ignore standard choices for now and focus on
 grouped choices only?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31262#comment:4>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.60a75a226ea9315c533435e35f5bf3ac%40djangoproject.com.

Reply via email to