#12281 closed (fixed)
Admin Actions: Display Message on Empty Queryset
| Reported by: | Paul Smith | Owned by: | Paul Smith |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | admin actions change-list | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When a user chooses an action in the Admin's change list (such as, "Delete selected Items") and hits "Go", but no items have been selected, the action function does not fire, and no message is sent to the user. I've noticed that some people have been confused by this. I realize it sounds dumb, but it would be less confusing for users if there were a message created - something like, "Items must be selected in order to perform actions on them. No items have been changed.", when a user clicks Go with nothing selected.
Attachments (1)
Change History (11)
comment:1 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 16 years ago
| Component: | Contrib apps → django.contrib.admin |
|---|
comment:3 by , 16 years ago
| Triage Stage: | Accepted → Design decision needed |
|---|
Actually, this is in conflict with #10768
comment:4 by , 16 years ago
| Triage Stage: | Design decision needed → Accepted |
|---|
This is a better idea than #10768.
comment:5 by , 16 years ago
| Needs documentation: | set |
|---|---|
| Needs tests: | set |
| Owner: | changed from to |
| Status: | new → assigned |
comment:6 by , 16 years ago
| Has patch: | set |
|---|---|
| Needs documentation: | unset |
| Needs tests: | unset |
Added patch that updates ModelAdmin.response_action(). Now a message is sent to the user in the case that:
1) The user chooses an action and clicks go, but no items are selected.
2) Selects items and clicks go without choosing an action.
comment:8 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Sounds fair enough