Filed a bug - https://code.djangoproject.com/ticket/33263
On Wednesday, November 3, 2021 at 4:01:31 PM UTC+3 Eugene Prikazchikov wrote: > Hi there, > > I am giving a try to Django 4.0 on one of my projects and I see that > DeleteView does not call .delete() method anymore. Instead, it only calls > self.object.delete(). > This breaks my code, since some of my views override .delete() method to > do extra work on object deletion (for example to make some external API > calls, etc) > > As I understand, this was introduced when implementing the ticket > https://code.djangoproject.com/ticket/21936 > particularly this line > https://github.com/django/django/commit/3a45fea0832c5910acee6e0d29f230f347a50462#diff-bf5815bb9e60d6b9f1a261957863a70cc9ad03efdbd7941c0e1659b7ceb2895fR250 > Now DeletionMixin.post and DeletionMixin.delete methods are essentially > shadowed (never get called). > > Is it a bug or intended behavior? > If it is a bug, is there an existing ticket for this issue? If needed, I > am open to create one and perhaps provide tests/PR for it (the bug seems > rather small and approachable for newcomer). > If not - then doc probably should more clearly say that .delete() method > is not working anymore. > > Thank you, > Eugene > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6a6dd33f-ca64-4c83-bbac-e4c2ae0763a7n%40googlegroups.com.

