mirror of
https://github.com/django/django.git
synced 2025-11-24 21:00:12 +00:00
Further consolidated the model_inheritance tests.
This commit is contained in:
parent
3f76339355
commit
3f01e82c59
5 changed files with 27 additions and 68 deletions
|
|
@ -73,9 +73,14 @@ class ParkingLot4B(Place, ParkingLot4):
|
|||
pass
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Supplier(models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
restaurant = models.ForeignKey(Restaurant)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class Wholesaler(Supplier):
|
||||
retailer = models.ForeignKey(Supplier, related_name='wholesale_supplier')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue