  
  @python_2_unicode_compatible
  class TaggedItem(models.Model):
      tag = models.SlugField()
      content_type = models.ForeignKey(ContentType, related_name='tagged_items')
      object_id = models.PositiveIntegerField()
      content_object = GenericForeignKey('content_type', 'object_id')
  
      def __str__(self):
          return self.tag
 
</s> remove     content_type = models.ForeignKey(ContentType, related_name="taggeditem_set2")
 </s> add     content_type = models.ForeignKey(
        ContentType,
        models.CASCADE,
        related_name="taggeditem_set2",
    ) </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     content_type = models.ForeignKey(ContentType, related_name='backend_tags')
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE, related_name='backend_tags') </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE)
    content_type = models.ForeignKey(ContentType, models.CASCADE, related_name='tagged_items')
  
  @python_2_unicode_compatible
  class TaggedItem(models.Model):
      tag = models.SlugField()
    content_type = models.ForeignKey(ContentType, models.CASCADE, related_name='tagged_items')
      object_id = models.PositiveIntegerField()
      content_object = GenericForeignKey('content_type', 'object_id')
  
      def __str__(self):
          return self.tag
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/admin_filters/models.py