#30951: Admin Documentation recommends an incorrect method to get selected
objects.
-------------------------------+--------------------------------------
Reporter: Daniel | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Old description:
> ( 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.
New description:
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.
--
Comment (by Daniel):
https://github.com/django/django/pull/12016
--
Ticket URL: <https://code.djangoproject.com/ticket/30951#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/070.f9486837352de04545944188f2aa867d%40djangoproject.com.