#33807: Suggestion: Admin actions drop-down with opt-groups
-------------------------------------+-------------------------------------
Reporter: Jonas Vacek | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: admin, actions, | Triage Stage:
drop-down, optgroup | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* type: Uncategorized => New feature
* resolution: => wontfix
Comment:
This should already be possible overriding
`ModelAdmin.get_action_choices()`
([https://github.com/django/django/blob/bff5c114be2b7a3fbc735c232abcc6ad4db89a9d/django/contrib/admin/options.py#L1022
src])
This returns an iterable to be assigned to the form field's `choices`, so
grouping them works as expected:
[[Image(https://code.djangoproject.com/raw-
attachment/ticket/33807/Screenshot%202022-06-28%20at%2009.52.55.png)]]
Historically, e.g. #19235, requests have centred around not using a select
at all, since the number of actions is typically low, so I don't think
expanding the documentation here is worthwhile.
--
Ticket URL: <https://code.djangoproject.com/ticket/33807#comment:1>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/01070181a96419ed-ac6c39e6-b085-4484-a1a2-d54e132781b5-000000%40eu-central-1.amazonses.com.