mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #15522 -- Added ModelAdmin.delete_queryset() to customize "delete selected objects" deletion.
This commit is contained in:
committed by
Tim Graham
parent
ec2ce4517a
commit
777f216d55
@@ -232,6 +232,10 @@ class SubscriberAdmin(admin.ModelAdmin):
|
||||
actions = ['mail_admin']
|
||||
action_form = MediaActionForm
|
||||
|
||||
def delete_queryset(self, request, queryset):
|
||||
SubscriberAdmin.overridden = True
|
||||
super().delete_queryset(request, queryset)
|
||||
|
||||
def mail_admin(self, request, selected):
|
||||
EmailMessage(
|
||||
'Greetings from a ModelAdmin action',
|
||||
|
||||
Reference in New Issue
Block a user