From 30e57038440d7785072088c10fef3ed6e71faba5 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 15 May 2015 09:10:54 -0400 Subject: [1.8.x] Fixed #24802 -- Delayed GDAL check for OSMGeoAdmin Backport of a37dcfd0a38cff24eb4fb5e3858791aa5428c853 from master --- tests/gis_tests/geoadmin/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/gis_tests/geoadmin/models.py b/tests/gis_tests/geoadmin/models.py index cf8470e792..4167471367 100644 --- a/tests/gis_tests/geoadmin/models.py +++ b/tests/gis_tests/geoadmin/models.py @@ -1,5 +1,6 @@ from django.contrib.gis import admin from django.contrib.gis.db import models +from django.contrib.gis.gdal import HAS_GDAL from django.utils.encoding import python_2_unicode_compatible @@ -16,4 +17,5 @@ class City(models.Model): def __str__(self): return self.name -admin.site.register(City, admin.OSMGeoAdmin) +if HAS_GDAL: + admin.site.register(City, admin.OSMGeoAdmin) -- cgit v1.3