Mention some cautions in section overriding delete()
|Reported by:||FunkyELF||Owned by:||nobody|
|Severity:||Keywords:||delete admin signals|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I strongly feel that this section...
... should have a note or something like the following.
Note that the delete() method for an object is not necessarily called when deleting a queryset containing that object as explained in http://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects.
To ensure a customized delete method gets called have a look at http://docs.djangoproject.com/en/dev/topics/signals/#topics-signals
Also note that when deleting an object from the built in admin interface related objects may be deleted in this way and may not call the overridden delete() method.
Change History (5)
comment:1 Changed 5 years ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted