Opened 9 years ago
Closed 8 years ago
#27326 closed New feature (duplicate)
Overriding queryset deletion from ModelAdmin
| Reported by: | Dimitris Glynos | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| 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
Hello all,
in a project I've found it useful to have ModelAdmin export a delete_queryset(self, request, queryset)
method so that one may override this to perform extra actions required during the queryset deletion
process.
The attached patch implements this logic.
Cheers,
Dimitris
Attachments (1)
Change History (4)
by , 9 years ago
| Attachment: | modeladmin_delete_queryset.diff added |
|---|
comment:1 by , 9 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Duplicate of #15522. Tests and documentation are also needed. Please send a pull request if you'd like to complete the patch. Thanks.
comment:2 by , 8 years ago
| Resolution: | duplicate |
|---|---|
| Status: | closed → new |
Based on Dimitris idea i have send a pull request. The link is https://github.com/django/django/pull/8990
comment:3 by , 8 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Please use ticket #15522 instead. This ticket is closed as a duplicate of that one.
ModelAdmin delete_queryset git diff (affects options.py and actions.py)