#27910: Allow using an Enum class in model Field choices
-------------------------------------+-------------------------------------
     Reporter:  Marcel Hellwig       |                    Owner:  Nick Pope
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  enum model choices   |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"72ebe85a269aab4bdb3829de4846b41f90973c5d" 72ebe85]:
 {{{
 #!CommitTicketReference repository=""
 revision="72ebe85a269aab4bdb3829de4846b41f90973c5d"
 Fixed #27910 -- Added enumeration helpers for use in Field.choices.

 These classes can serve as a base class for user enums, supporting
 translatable human-readable names, or names automatically inferred
 from the enum member name.

 Additional properties make it easy to access the list of names, values
 and display labels.

 Thanks to the following for ideas and reviews:

 Carlton Gibson, Fran Hrženjak, Ian Foote, Mariusz Felisiak, Shai Berger.

 Co-authored-by: Shai Berger <s...@platonix.com>
 Co-authored-by: Nick Pope <nick.p...@flightdataservices.com>
 Co-authored-by: Mariusz Felisiak <felisiak.mari...@gmail.com>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27910#comment:19>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.89ce004ff33764473a3e1243e613991c%40djangoproject.com.

Reply via email to