  
  @python_2_unicode_compatible
  class Supplier(models.Model):
      name = models.CharField(max_length=50)
      restaurant = models.ForeignKey(Restaurant)
  
      def __str__(self):
          return self.name
  
  
 
</s> remove     restaurant = models.ForeignKey(Restaurant)
 </s> add     restaurant = models.ForeignKey(Restaurant, models.CASCADE) </s> remove         restaurant = models.ForeignKey(Restaurant)
 </s> add         restaurant = models.ForeignKey(Restaurant, on_delete=models.CASCADE) </s> remove     related = models.ForeignKey(Secondary)
 </s> add     related = models.ForeignKey(Secondary, models.CASCADE) </s> remove     country = models.ForeignKey(Country)
 </s> add     country = models.ForeignKey(Country, models.CASCADE) </s> remove     location = models.ForeignKey(Location)
 </s> add     location = models.ForeignKey(Location, models.CASCADE)
    restaurant = models.ForeignKey(Restaurant, models.CASCADE)
  
  @python_2_unicode_compatible
  class Supplier(models.Model):
      name = models.CharField(max_length=50)
    restaurant = models.ForeignKey(Restaurant, 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/model_inheritance_regress/models.py