When deleting from the admin interface, the delete is actually on the entire QuerySet rather than on the object level. So if you need to perform some object level modification on the delete action of the admin interface, you can remove the default 'delete_selected' action, and go a custom delete action. Like:
class SomeModelAdmin(admin.ModelAdmin):
actions = ['custom_delete']
def custom_delete(self, request, queryset):
for object in queryset:
perform_some_action(object)
object.delete()
custom_delete.short_description = "Delete selected items"
def get_actions(self, request):
actions = super(SomeModelAdmin, self).get_actions(request)
del actions['delete_selected']
return actions
Subhranath Chunder.