      from django.db import models
      from django.utils.translation import ugettext_lazy as _
  
      class MyThing(models.Model):
          kind = models.ForeignKey(ThingKind, related_name='kinds',
                                   verbose_name=_('kind'))
  
          def is_mouse(self):
              return self.kind.type == MOUSE_TYPE
          is_mouse.short_description = _('Is it a mouse?')
  
 
</s> remove         kind = models.ForeignKey(ThingKind, related_name='kinds',
                                 verbose_name=_('kind'))
 </s> add         kind = models.ForeignKey(
            ThingKind,
            on_delete=models.CASCADE,
            related_name='kinds',
            verbose_name=_('kind'),
        ) </s> remove         zip_code = models.ForeignKey(ZipCode)
 </s> add         zip_code = models.ForeignKey(
            ZipCode,
            on_delete=models.SET_NULL,
            blank=True,
            null=True,
        )
        kind = models.ForeignKey(
            ThingKind,
            on_delete=models.CASCADE,
            related_name='kinds',
            verbose_name=_('kind'),
        )
      from django.db import models
      from django.utils.translation import ugettext_lazy as _
  
      class MyThing(models.Model):
        kind = models.ForeignKey(
            ThingKind,
            on_delete=models.CASCADE,
            related_name='kinds',
            verbose_name=_('kind'),
        )
        kind = models.ForeignKey(
            ThingKind,
            on_delete=models.CASCADE,
            related_name='kinds',
            verbose_name=_('kind'),
        )
  
          def is_mouse(self):
              return self.kind.type == MOUSE_TYPE
          is_mouse.short_description = _('Is it a mouse?')
  
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
docs/topics/i18n/translation.txt