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:
committed by
Anssi Kääriäinen
parent
dcdc579d16
commit
163a34ce4b
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user