  
  @python_2_unicode_compatible
  class State(models.Model):
      name = models.CharField(max_length=50)
      country = models.ForeignKey(Country)
  
      def __str__(self):
          return self.name
  
  
 
</s> remove     related = models.ForeignKey(Secondary)
 </s> add     related = models.ForeignKey(Secondary, models.CASCADE) </s> remove     restaurant = models.ForeignKey(Restaurant)
 </s> add     restaurant = models.ForeignKey(Restaurant, models.CASCADE) </s> remove     location = models.ForeignKey(Location)
 </s> add     location = models.ForeignKey(Location, models.CASCADE) </s> remove     author = models.ForeignKey(Author, related_name='fans')
 </s> add     author = models.ForeignKey(Author, models.CASCADE, related_name='fans') </s> remove     boss = models.ForeignKey('self', null=True,
                             related_name='serfs')
 </s> add     boss = models.ForeignKey('self', models.SET_NULL, null=True, related_name='serfs')
    country = models.ForeignKey(Country, models.CASCADE)
  
  @python_2_unicode_compatible
  class State(models.Model):
      name = models.CharField(max_length=50)
    country = models.ForeignKey(Country, models.CASCADE)
  
      def __str__(self):
          return self.name
  
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/proxy_models/models.py