1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #20883 -- Made model inheritance find parent links in abstract parents

This commit is contained in:
Loic Bistuer
2013-08-12 18:30:38 +07:00
committed by Anssi Kääriäinen
parent dcdc579d16
commit 163a34ce4b
4 changed files with 47 additions and 6 deletions

View File

@@ -50,6 +50,19 @@ class ParkingLot3(Place):
primary_key = models.AutoField(primary_key=True)
parent = models.OneToOneField(Place, parent_link=True)
class ParkingLot4(models.Model):
# Test parent_link connector can be discovered in abstract classes.
parent = models.OneToOneField(Place, parent_link=True)
class Meta:
abstract = True
class ParkingLot4A(ParkingLot4, Place):
pass
class ParkingLot4B(Place, ParkingLot4):
pass
class Supplier(models.Model):
restaurant = models.ForeignKey(Restaurant)