Fixed #10733 -- select_related().only() failure

The bug was reported pre 1.1, and somewhere along the way it has been
fixed. So, this is tests only addition.
This commit is contained in:
Anssi Kääriäinen 2013-10-01 19:27:20 +03:00
parent 32e40bbe71
commit 8d4b1629d4
2 changed files with 35 additions and 1 deletions

View file

@ -108,3 +108,21 @@ class Hen(Fowl):
class Chick(Fowl):
mother = models.ForeignKey(Hen)
class Base(models.Model):
name = models.CharField(max_length=10)
lots_of_text = models.TextField()
class Meta:
abstract = True
class A(Base):
a_field = models.CharField(max_length=10)
class B(Base):
b_field = models.CharField(max_length=10)
class C(Base):
c_a = models.ForeignKey(A)
c_b = models.ForeignKey(B)
is_published = models.BooleanField()