Opened 14 years ago
Closed 14 years ago
#15140 closed (wontfix)
Allow redefining object to delete collector in Django admin
Reported by: | Manuel Saelices | Owned by: | Manuel Saelices |
---|---|---|---|
Component: | contrib.admin | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
ModelAdmin
should be able to redefining easily the objects to delete collector.
Attachments (1)
Change History (6)
by , 14 years ago
Attachment: | customizable_objects_to_delete_collector_r15256.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Note that the only lines I've changed in patch was this:
def get_deleted_objects(objs, opts, user, admin_site, using): """ ... """ collector = NestedObjects(using=using)
To this:
def get_deleted_objects(objs, opts, user, admin_site, using, collector_class=NestedObjects): """ ... """ collector = collector_class(using=using)
The other changes (marked in green and red in patch) are due because I have to move up the NestedObjects
implementation to be accesible by the get_deleted_objects
function.
comment:3 by , 14 years ago
Owner: | changed from | to
---|
comment:5 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm with Alex - I don't see the use case here. THe list of objects to be deleted isn't a matter of debate or control; it's a direct consequence of the delete cascading rules.
If you want to advocate for this change, please start a discussion on django-dev.
With this patch you can do something like this: