My Django model has custom logic in the delete
method. Therefore since I wane to make sure that this logic is called when I call delete on my queryset
, I wrote my own queryset
delete.
class MyQuerySet(QuerySet):
# Do we have to be any fancier here?
def delete(self):
for m in self:
m.delete()
and my question is do I have to do anything fancier than iterating and calling delete
on each instance?