1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #26320 -- Deprecated implicit OneToOnField parent_link.

This commit is contained in:
Tim Graham
2016-04-22 12:59:41 -04:00
parent 9e4e20a71c
commit 87338198e9
8 changed files with 40 additions and 22 deletions

View File

@@ -45,12 +45,6 @@ class ParkingLot(Place):
return "%s the parking lot" % self.name
class ParkingLot2(Place):
# In lieu of any other connector, an existing OneToOneField will be
# promoted to the primary key.
parent = models.OneToOneField(Place, models.CASCADE)
class ParkingLot3(Place):
# The parent_link connector need not be the pk on the model.
primary_key = models.AutoField(primary_key=True)