              limit_choices_to=limit_choices_to,
          )
  
          kwargs['blank'] = True
          kwargs['editable'] = False
          kwargs['serialize'] = False
  
          # This construct is somewhat of an abuse of ForeignObject. This field
          # represents a relation from pk to object_id field. But, this relation
          # isn't direct, the join is generated reverse along foreign key. So,
 
</s> remove     user = models.OneToOneField(User, primary_key=True)
 </s> add     user = models.OneToOneField(User, models.CASCADE, primary_key=True) </s> remove     def __init__(self, to, from_fields, to_fields, **kwargs):
 </s> add     def __init__(self, to, on_delete, from_fields, to_fields, **kwargs): </s> remove     parent = models.OneToOneField(Place)
 </s> add     parent = models.OneToOneField(Place, models.CASCADE) </s> remove         self.assertIn("parent = models.ForeignKey('self')", output)
        self.assertNotIn("from = models.ForeignKey(InspectdbPeople)", output, msg=error_message)
 </s> add         self.assertIn("parent = models.ForeignKey('self', models.DO_NOTHING)", output)
        self.assertNotIn(
            "from = models.ForeignKey(InspectdbPeople, models.DO_NOTHING)",
            output,
            msg=error_message,
        ) </s> remove         super(CurrentTranslation, self).__init__(to, from_fields, to_fields, **kwargs)
 </s> add         super(CurrentTranslation, self).__init__(to, on_delete, from_fields, to_fields, **kwargs)
        kwargs['on_delete'] = models.CASCADE
              limit_choices_to=limit_choices_to,
          )
  
          kwargs['blank'] = True
        kwargs['on_delete'] = models.CASCADE
          kwargs['editable'] = False
          kwargs['serialize'] = False
  
          # This construct is somewhat of an abuse of ForeignObject. This field
          # represents a relation from pk to object_id field. But, this relation
          # isn't direct, the join is generated reverse along foreign key. So,
keep keep keep add keep keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
django/contrib/contenttypes/fields.py