#ONDELETE CASCADE your_foreign_key_field = models.ForeignKey(Your_Reference_Model, on_delete=models.CASCADE) #ONDELETE SET_NULL your_foreign_key_field = models.ForeignKey(Your_Reference_Model, on_delete=models.SET_NULL)