class Widget(models.Model):
title = models.CharField(max_length=255)
class WidgetFile(models.Model):
widget = models.ForeignKey(Widget)
def delete():
# do some custom hard drive file vodo
super(WidgetFile, self).delete()
... some code to create a Widget and a WidgetFile to go with it ...
some_widget_instance.delete()
This deletes the Widget and it's related WidgetFile without triggering my special delete method above. Why? and what is the best way to circumvent this.