  
  
  @python_2_unicode_compatible
  class Poem(models.Model):
      poet = models.ForeignKey(Poet)
      name = models.CharField(max_length=100)
  
      def __str__(self):
          return self.name
 
</s> remove     poet = models.ForeignKey(Poet)
 </s> add     poet = models.ForeignKey(Poet, models.CASCADE) </s> remove     team = models.ForeignKey(Team, null=True)
 </s> add     team = models.ForeignKey(Team, models.SET_NULL, null=True) </s> remove     department = models.ForeignKey(Department, to_field="code")
 </s> add     department = models.ForeignKey(Department, models.CASCADE, to_field="code") </s> remove     restaurant = models.ForeignKey(Restaurant)
 </s> add     restaurant = models.ForeignKey(Restaurant, models.CASCADE) </s> remove     country = models.ForeignKey(Country)
 </s> add     country = models.ForeignKey(Country, models.CASCADE)
    poet = models.ForeignKey(Poet, models.CASCADE)
  
  
  @python_2_unicode_compatible
  class Poem(models.Model):
    poet = models.ForeignKey(Poet, models.CASCADE)
      name = models.CharField(max_length=100)
  
      def __str__(self):
          return self.name
keep keep keep keep replace keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/inline_formsets/models.py