#19303: ModelAdmin.formfield_overrides is ignored for fields with choices
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: Bug | LukaszBalcerzak
Component: contrib.admin | Status: assigned
Severity: Normal | Version: 1.5
Keywords: | Resolution:
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by zuber):
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin
Comment:
The code is pretty ugly, but I haven't found any other way to solve the
issue without breaking backwards compatibility. I'd merge the code to
master right now and think of a better solution later.
Ideally we should introduce another dimension to `formfield_overrides`
dict, and choose the widget for formfield based not only on the formfield
class, but also on its attributes (`choices` attribute in particular). See
#20465.
--
Ticket URL: <https://code.djangoproject.com/ticket/19303#comment:7>
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.