[4.0.x] Refs #33263 -- Expanded release notes for DeleteView adopting FormMixin.

Backport of 2c01ebb4be from main
This commit is contained in:
Carlton Gibson 2021-11-04 15:12:08 +01:00 committed by Mariusz Felisiak
parent 499384b6d1
commit 3151daaa6c
1 changed files with 12 additions and 0 deletions

View File

@ -273,6 +273,10 @@ Generic Views
deletion. In addition, this allows ``DeleteView`` to function with deletion. In addition, this allows ``DeleteView`` to function with
:class:`django.contrib.messages.views.SuccessMessageMixin`. :class:`django.contrib.messages.views.SuccessMessageMixin`.
In accordance with ``FormMixin``, object deletion for POST requests is
handled in ``form_valid()``. Custom delete logic in ``delete()`` handlers
should be moved to ``form_valid()``, or a shared helper method, as needed.
Logging Logging
~~~~~~~ ~~~~~~~
@ -477,6 +481,14 @@ As a side-effect, running ``makemigrations`` might generate no-op
``AlterField`` operations for ``ManyToManyField`` and ``ForeignKey`` fields in ``AlterField`` operations for ``ManyToManyField`` and ``ForeignKey`` fields in
some cases. some cases.
``DeleteView`` changes
----------------------
:class:`~django.views.generic.edit.DeleteView` now uses
:class:`~django.views.generic.edit.FormMixin` to handle POST requests. As a
consequence, any custom deletion logic in ``delete()`` handlers should be
moved to ``form_valid()``, or a shared helper method, if required.
Miscellaneous Miscellaneous
------------- -------------