django-lifecycle icon indicating copy to clipboard operation
django-lifecycle copied to clipboard

Deleting model objects from Admin not triggering BEFORE_DELETE and AFTER_DELETE hooks

Open babus opened this issue 3 years ago • 1 comments

Calling model_object.delete() successfully calls both BEFORE_DELETE and AFTER_DELETE hooks but if the same object is deleted from Django admin the hooks are not being called.

babus avatar Mar 24 '21 17:03 babus

I met the same issue but found out it had been explained and addressed by official Django doc: https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#admin-actions

eplutus avatar Sep 14 '21 04:09 eplutus

As @eplutus said, this is a limitation of Django itself. It's explained in the docs, and it says some possible workarounds.

I'm closing this as there's nothing more we can do.

EnriqueSoria avatar Sep 11 '23 11:09 EnriqueSoria