mirror of
https://github.com/django/django.git
synced 2025-08-08 21:08:25 +00:00
Fixed #6191, #11296 -- Modified the admin deletion confirmation page to use the same object collection scheme as the actual deletion. This ensures that all objects that may be deleted are actually deleted, and that cyclic display problems are avoided. Thanks to carljm for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
126ca330e2
commit
e12b3199d0
10 changed files with 415 additions and 141 deletions
|
@ -50,7 +50,7 @@ class CollectedObjects(object):
|
|||
else:
|
||||
self.blocked = {}
|
||||
|
||||
def add(self, model, pk, obj, parent_model, nullable=False):
|
||||
def add(self, model, pk, obj, parent_model, parent_obj=None, nullable=False):
|
||||
"""
|
||||
Adds an item to the container.
|
||||
|
||||
|
@ -60,6 +60,8 @@ class CollectedObjects(object):
|
|||
* obj - the object itself.
|
||||
* parent_model - the model of the parent object that this object was
|
||||
reached through.
|
||||
* parent_obj - the parent object this object was reached
|
||||
through (not used here, but needed in the API for use elsewhere)
|
||||
* nullable - should be True if this relation is nullable.
|
||||
|
||||
Returns True if the item already existed in the structure and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue