  
  @python_2_unicode_compatible
  class LogEntry(models.Model):
      action_time = models.DateTimeField(_('action time'), auto_now=True)
      user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('user'))
      content_type = models.ForeignKey(ContentType, verbose_name=_('content type'), blank=True, null=True)
      object_id = models.TextField(_('object id'), blank=True, null=True)
      object_repr = models.CharField(_('object repr'), max_length=200)
      action_flag = models.PositiveSmallIntegerField(_('action flag'))
      change_message = models.TextField(_('change message'), blank=True)
  
 
</s> remove         parent = models.ForeignKey(RangesModel, blank=True, null=True)
 </s> add         parent = models.ForeignKey(RangesModel, models.SET_NULL, blank=True, null=True) </s> remove     collection = models.ForeignKey(ProfileCollection, blank=True, null=True)
 </s> add     collection = models.ForeignKey(ProfileCollection, models.SET_NULL, blank=True, null=True) </s> remove     author = models.ForeignKey(User, verbose_name="Verbose Author", related_name='books_authored', blank=True, null=True)
 </s> add     author = models.ForeignKey(
        User,
        models.SET_NULL,
        verbose_name="Verbose Author",
        related_name='books_authored',
        blank=True, null=True,
    ) </s> remove     parent = models.ForeignKey('self', to_field='barcode', blank=True, null=True)
 </s> add     parent = models.ForeignKey('self', models.SET_NULL, to_field='barcode', blank=True, null=True) </s> remove     collection = models.ForeignKey(TitleCollection, blank=True, null=True)
 </s> add     collection = models.ForeignKey(TitleCollection, models.SET_NULL, blank=True, null=True)
    user = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        models.CASCADE,
        verbose_name=_('user'),
    )
    content_type = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        verbose_name=_('content type'),
        blank=True, null=True,
    )
  
  @python_2_unicode_compatible
  class LogEntry(models.Model):
      action_time = models.DateTimeField(_('action time'), auto_now=True)
    user = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        models.CASCADE,
        verbose_name=_('user'),
    )
    content_type = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        verbose_name=_('content type'),
        blank=True, null=True,
    )
    user = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        models.CASCADE,
        verbose_name=_('user'),
    )
    content_type = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        verbose_name=_('content type'),
        blank=True, null=True,
    )
      object_id = models.TextField(_('object id'), blank=True, null=True)
      object_repr = models.CharField(_('object repr'), max_length=200)
      action_flag = models.PositiveSmallIntegerField(_('action flag'))
      change_message = models.TextField(_('change message'), blank=True)
  
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
django/contrib/admin/models.py