Exploring ForeignKey's on_delete Handlers in Django
Django models’ foreign keys require you to set an on_delete function. This is true for ForeignKey, OneToOne, and OneToMany fields. In this blog post, I will go into detail on what each method does and illustrate when to apply each one.