Opened 5 years ago
Closed 5 years ago
#30951 closed Cleanup/optimization (duplicate)
Admin Documentation recommends an incorrect method to get selected objects.
Reported by: | Daniel | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 2.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
PR to fix this: https://github.com/django/django/pull/12016
( https://docs.djangoproject.com/en/2.2/ref/contrib/admin/actions/#actions-that-provide-intermediate-pages )
/docs/ref/contrib/admin/actions.txt
in paragraph
Actions that provide intermediate pages
recommends directly accessing the form values:
selected = request.POST.getlist(admin.ACTION_CHECKBOX_NAME)
to get a list of selected ids. This fails to take into account if the select all
box has been selected.
Change History (2)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Type: | Bug → Cleanup/optimization |
Duplicate of #15742.
https://github.com/django/django/pull/12016