diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-04-24 18:16:40 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-04-24 20:30:23 +0200 |
| commit | a37dcfd0a38cff24eb4fb5e3858791aa5428c853 (patch) | |
| tree | 4892ae0e738035aa31701e3d26c5a4dba61bb8ec /tests | |
| parent | b69515385279458b30a51ed73be28edc7407c1fa (diff) | |
Delayed GDAL check for OSMGeoAdmin
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/geoadmin/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gis_tests/geoadmin/models.py b/tests/gis_tests/geoadmin/models.py index b7d3b53c60..99dbae5d91 100644 --- a/tests/gis_tests/geoadmin/models.py +++ b/tests/gis_tests/geoadmin/models.py @@ -1,3 +1,4 @@ +from django.contrib.gis.gdal import HAS_GDAL from django.utils.encoding import python_2_unicode_compatible from ..admin import admin @@ -19,4 +20,5 @@ class City(models.Model): return self.name site = admin.AdminSite(name='admin_gis') -site.register(City, admin.OSMGeoAdmin) +if HAS_GDAL: + site.register(City, admin.OSMGeoAdmin) |
