Skip to content Skip to sidebar Skip to footer

Django Model Inheritance Versus Onetoone Field

EDIT: Advantages and disadvantages of both methods. SO, I have three models: Person, Client, Member Person is a base model, Client and Member are profiles for Person. class Person(

Solution 1:

You can use the post_delete signal for this.

So you would:

  • Register the post_delete signals on both the models
  • One delet, check if the other object exists, and delete.

There are lots of examples on the implementation of post_delete signals on StackOverflow, so i will leave that part out.

Post a Comment for "Django Model Inheritance Versus Onetoone Field"