summaryrefslogtreecommitdiff
path: root/tests/gis_tests/layermap/models.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-03-21 16:59:30 +0100
committerClaude Paroz <claude@2xlibre.net>2015-03-21 16:59:30 +0100
commita6bada1ee0c3756e4b8d6bd4b4346dd5235c78ce (patch)
tree4830e0c4728b923e8371db5be7008c02acfb54b2 /tests/gis_tests/layermap/models.py
parente0cc36f615f70061e034f5ba3f4e75330f51d3ca (diff)
Revert "Removed unneeded app_label definitions in gis_tests"
This reverts commit e0cc36f615f70061e034f5ba3f4e75330f51d3ca. The problem is the following: * With non-gis backends, gis_tests sub apps are not discovered (see runtests.py) * Consequently, the app_label is inferred from the gis_tests AppConfig * Then models with same names in different sub apps conflict because of same model_name/app_label pair.
Diffstat (limited to 'tests/gis_tests/layermap/models.py')
-rw-r--r--tests/gis_tests/layermap/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/gis_tests/layermap/models.py b/tests/gis_tests/layermap/models.py
index 545f2fa75d..f2c7882547 100644
--- a/tests/gis_tests/layermap/models.py
+++ b/tests/gis_tests/layermap/models.py
@@ -36,11 +36,17 @@ class City(NamedModel):
dt = models.DateField()
point = models.PointField()
+ class Meta:
+ app_label = 'layermap'
+
class Interstate(NamedModel):
length = models.DecimalField(max_digits=6, decimal_places=2)
path = models.LineStringField()
+ class Meta:
+ app_label = 'layermap'
+
# Same as `City` above, but for testing model inheritance.
class CityBase(NamedModel):