  
  @python_2_unicode_compatible
  class PlotDetails(models.Model):
      details = models.CharField(max_length=100)
      plot = models.OneToOneField(Plot)
  
      def __str__(self):
          return self.details
  
  
 
</s> remove     details = models.OneToOneField(Detail, primary_key=True)
 </s> add     details = models.OneToOneField(Detail, models.CASCADE, primary_key=True) </s> remove     poet = models.ForeignKey(Poet)
 </s> add     poet = models.ForeignKey(Poet, models.CASCADE) </s> remove     poet = models.ForeignKey(Poet)
 </s> add     poet = models.ForeignKey(Poet, models.CASCADE) </s> remove     team = models.ForeignKey(Team, null=True)
 </s> add     team = models.ForeignKey(Team, models.SET_NULL, null=True) </s> remove     department = models.ForeignKey(Department, to_field="code")
 </s> add     department = models.ForeignKey(Department, models.CASCADE, to_field="code")
    plot = models.OneToOneField(Plot, models.CASCADE)
  
  @python_2_unicode_compatible
  class PlotDetails(models.Model):
      details = models.CharField(max_length=100)
    plot = models.OneToOneField(Plot, models.CASCADE)
  
      def __str__(self):
          return self.details
  
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/admin_views/models.py