#30311: Can't replace global admin actions with specialized ones per-admin
-----------------------------------------+------------------------
Reporter: Aarni Koskela | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
f9ff1df1daac8ae1fc22b27f48735148cb5488dd landed in 2.2 (discussion in
#29917), which makes it impossible to replace a generic site-wide action
(such as the built-in `delete_selected`) with a new one. It fails with the
admin.E130 system check error.
We're seeing this with the qsessions app, which has to delete its session
objects in non-bulk mode in order to clear caches:
https://github.com/QueraTeam/django-
qsessions/blob/c21d602a50c4746da7f698a8d39317ef214e7d05/qsessions/admin.py#L41-L46
(For this particular use case, it seems a fix is to instead override
`modeladmin.delete_queryset` within `qsessions`'s `SessionAdmin`, as
that's what the built-in `delete_selected` action does per
https://github.com/django/django/blob/851d9eac23e08ff10a2d6fe5368b02798761663c/django/contrib/admin/actions.py#L40
.)
--
Ticket URL: <https://code.djangoproject.com/ticket/30311>
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/046.ae8de1cbb9423faa6b1e57397d883b29%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.