#17090: Problems with ModelAdmin.get_list_display()
-----------------------------------------+------------------------
Reporter: julien | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.3
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
While working on #16257 I've noticed some problems with the
`ModelAdmin.get_list_display()` method that was introduced in r16340:
* There is an inconsistency with `list_display`. If you set `list_display`
to `('bacon', 'cheese',)` then `get_list_display()` will return
`('action_checkbox', 'bacon', 'cheese',)`.
* The presence (or absence) of the action checkbox should be dictated
solely by the presence (or absence) of `ModelAdmin.actions`, not by what
is returned by `get_list_display()`.
The attached patch rectifies this behavior by injecting 'action_checkbox'
further downstream after 'get_list_display()' is called. This would be a
minor backwards-incompatibility for those who have been using the still-
unreleased 'get_list_display()' method.
--
Ticket URL: <https://code.djangoproject.com/ticket/17090>
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 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.