1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #16891 -- Made Model/QuerySet.delete() return the number of deleted objects.

This commit is contained in:
Alexander Sosnovskiy
2015-03-07 11:56:25 +03:00
committed by Tim Graham
parent 9c8a2ab81d
commit 04e8d890ae
9 changed files with 120 additions and 20 deletions

View File

@@ -214,6 +214,10 @@ Models
<django.db.models.Model.delete>` to allow deleting only a child's data in a
model that uses multi-table inheritance.
* :meth:`Model.delete() <django.db.models.Model.delete>`
and :meth:`QuerySet.delete() <django.db.models.query.QuerySet.delete>` return
the number of objects deleted.
* Added a system check to prevent defining both ``Meta.ordering`` and
``order_with_respect_to`` on the same model.