Django Public Recipes
The code above creates a foreign key in the RelatedModel to link to the current model. When the related model is deleted, the related model's on_delete attribute is invoked, which in turn calls the cascade method on the current model.
Library: django
Shortcut: django.field.foreignkey
fieldName = models.ForeignKey(RelatedModel, on_delete=models.CASCADE)