1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[1.8.x] Fixed #24802 -- Delayed GDAL check for OSMGeoAdmin

Backport of a37dcfd0a3 from master
This commit is contained in:
Tim Graham
2015-05-15 09:10:54 -04:00
parent f19932591b
commit 30e5703844
3 changed files with 25 additions and 24 deletions

View File

@@ -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)