fix remaining potential accessor name clashes (but this only works with Django 1.2+, for 1.1 no changes). Thanks to Andrew Ingram.

This commit is contained in:
Bert Constantin
2010-02-02 08:40:56 +01:00
parent ecaed2a71f
commit a99a3b5bfc
3 changed files with 30 additions and 9 deletions
+10
View File
@@ -24,3 +24,13 @@ class SModelB(SModelA):
class SModelC(SModelB):
field3 = models.CharField(max_length=10)
# for Django 1.2+, test models with same names in different apps
# (the other models with identical names are in polymorphic/tests.py)
from django import VERSION as django_VERSION
if not (django_VERSION[0]<=1 and django_VERSION[1]<=1):
class Model2A(PolymorphicModel):
field1 = models.CharField(max_length=10)
class Model2B(Model2A):
field2 = models.CharField(max_length=10)
class Model2C(Model2B):
field3 = models.CharField(max_length=10)