  need to resolve the ambiguity manually using ``fk_name``. For example, consider
  the following model::
  
      class Friendship(models.Model):
          from_friend = models.ForeignKey(Friend, related_name='from_friends')
          to_friend = models.ForeignKey(Friend, related_name='friends')
          length_in_months = models.IntegerField()
  
  To resolve this, you can use ``fk_name`` to
  :func:`~django.forms.models.inlineformset_factory`::
  
 
</s> remove         author = models.ForeignKey(Person)
 </s> add         author = models.ForeignKey(Person, on_delete=models.CASCADE) </s> remove model was altered to ``blog = ForeignKey(Blog, related_name='entries')``, the
above example code would look like this::
 </s> add model was altered to ``blog = ForeignKey(Blog, on_delete=models.CASCADE,
related_name='entries')``, the above example code would look like this:: </s> remove     parent = models.OneToOneField(Place, primary_key=True, parent_link=True)
 </s> add     parent = models.OneToOneField(Place, models.CASCADE, primary_key=True, parent_link=True) </s> remove         person = models.ForeignKey(Person)
        group = models.ForeignKey(Group)
 </s> add         person = models.ForeignKey(Person, on_delete=models.CASCADE)
        group = models.ForeignKey(Group, on_delete=models.CASCADE) </s> remove         author = models.ForeignKey(Author)
 </s> add         author = models.ForeignKey(Author, on_delete=models.CASCADE)
        from_friend = models.ForeignKey(
            Friend,
            on_delete=models.CASCADE,
            related_name='from_friends',
        )
        to_friend = models.ForeignKey(
            Friend,
            on_delete=models.CASCADE,
            related_name='friends',
        )
  need to resolve the ambiguity manually using ``fk_name``. For example, consider
  the following model::
  
      class Friendship(models.Model):
        from_friend = models.ForeignKey(
            Friend,
            on_delete=models.CASCADE,
            related_name='from_friends',
        )
        to_friend = models.ForeignKey(
            Friend,
            on_delete=models.CASCADE,
            related_name='friends',
        )
        from_friend = models.ForeignKey(
            Friend,
            on_delete=models.CASCADE,
            related_name='from_friends',
        )
        to_friend = models.ForeignKey(
            Friend,
            on_delete=models.CASCADE,
            related_name='friends',
        )
          length_in_months = models.IntegerField()
  
  To resolve this, you can use ``fk_name`` to
  :func:`~django.forms.models.inlineformset_factory`::
  
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
docs/topics/forms/modelforms.txt