#36930: Using a custom ModelChoices (not IntegerChoices or TextChoices) member 
as
the default value of a model field doesn't select the default value in
form's select
-------------------------------------+-------------------------------------
     Reporter:  Antoine Humbert      |                    Owner:  Antoine
                                     |  Humbert
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  6.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  enum                 |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

 * cc: Nick Pope (added)
 * keywords:   => enum
 * stage:  Unreviewed => Accepted

Comment:

 Tentatively accepting, not sure how difficult the fix will be. A
 [https://github.com/django/django/pull/17186#issuecomment-1839162904
 related case] was discussed on the PR after merge, but it was dismissed
 since it was not strictly valid usage.

 There, Nick explains:

 > I considered making Choices subclass ReprEnum, but it doesn't work
 because it expects a concrete base type to be provided.

 So I'm not sure what we need to do instead.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36930#comment:3>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019c96021369-4756ae4a-0c7c-4a94-87e2-ef98bdc454d2-000000%40eu-central-1.amazonses.com.

Reply via email to