  class Article(models.Model):
      """
      A simple Article model for testing
      """
      site = models.ForeignKey(Site, related_name="admin_articles")
      title = models.CharField(max_length=100)
      title2 = models.CharField(max_length=100, verbose_name="another name")
      created = models.DateTimeField()
  
      def test_from_model(self):
 
</s> remove     author = models.ForeignKey(Author)
 </s> add     author = models.ForeignKey(Author, models.CASCADE) </s> remove     reporter = models.ForeignKey(ProxyTrackerUser)
    associated_bug = models.ForeignKey(ProxyProxyBug)
 </s> add     reporter = models.ForeignKey(ProxyTrackerUser, models.CASCADE)
    associated_bug = models.ForeignKey(ProxyProxyBug, models.CASCADE) </s> remove     section = models.ForeignKey(Section, null=True, blank=True)
    sub_section = models.ForeignKey(Section, null=True, blank=True, on_delete=models.SET_NULL, related_name='+')
 </s> add     section = models.ForeignKey(Section, models.CASCADE, null=True, blank=True)
    sub_section = models.ForeignKey(Section, models.SET_NULL, null=True, blank=True, related_name='+') </s> remove     chapter = models.ForeignKey(Chapter, on_delete=models.PROTECT)
 </s> add     chapter = models.ForeignKey(Chapter, models.PROTECT) </s> remove     author = models.ForeignKey(Author, related_name='books', null=True)
 </s> add     author = models.ForeignKey(Author, models.SET_NULL, related_name='books', null=True)
    site = models.ForeignKey(Site, models.CASCADE, related_name="admin_articles")
  class Article(models.Model):
      """
      A simple Article model for testing
      """
    site = models.ForeignKey(Site, models.CASCADE, related_name="admin_articles")
      title = models.CharField(max_length=100)
      title2 = models.CharField(max_length=100, verbose_name="another name")
      created = models.DateTimeField()
  
      def test_from_model(self):
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/admin_utils/models.py