diff options
| author | Tim Graham <timograham@gmail.com> | 2015-05-15 09:10:54 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-05-15 09:20:04 -0400 |
| commit | 30e57038440d7785072088c10fef3ed6e71faba5 (patch) | |
| tree | 81afa722ac1551242570b40a3a7d4bce59d4c752 /tests | |
| parent | f19932591b91c519545e4a53854f6289e35fa239 (diff) | |
[1.8.x] Fixed #24802 -- Delayed GDAL check for OSMGeoAdmin
Backport of a37dcfd0a38cff24eb4fb5e3858791aa5428c853 from master
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 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) |
