Fixed #8825 -- Fixed a small error model field setup (on the model class) from

r8855. Patch from Christofer Bernander. Test based on one from cgrady.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-09-03 05:53:50 +00:00
parent 43f901e581
commit 780f239fa7
2 changed files with 18 additions and 7 deletions

View file

@ -69,7 +69,13 @@ class Article(models.Model):
return self.headline
class ArticleWithAuthor(Article):
author = models.CharField(max_length=100)
author = models.CharField(max_length=100)
class M2MBase(models.Model):
articles = models.ManyToManyField(Article)
class M2MChild(M2MBase):
name = models.CharField(max_length=50)
__test__ = {'API_TESTS':"""
# Regression for #7350, #7202
@ -231,4 +237,9 @@ Traceback (most recent call last):
...
DoesNotExist: ArticleWithAuthor matching query does not exist.
# Regression test for #8825: Make sure all inherited fields (esp. m2m fields, in
# this case) appear on the child class.
>>> M2MChild.objects.filter(articles__isnull=False)
[]
"""}