From 3215bc98fe934f21f37fc5cc38ae5f123f444140 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 15 Dec 2016 17:09:21 -0500 Subject: [PATCH] Refs #27576 -- Fixed running Django's tests if GDAL isn't installed. --- django/contrib/gis/db/models/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/gis/db/models/fields.py b/django/contrib/gis/db/models/fields.py index 8dc272aaa4..2fd74da632 100644 --- a/django/contrib/gis/db/models/fields.py +++ b/django/contrib/gis/db/models/fields.py @@ -5,7 +5,6 @@ from django.contrib.gis.db.models.lookups import ( RasterBandTransform, gis_lookups, ) from django.contrib.gis.db.models.proxy import SpatialProxy -from django.contrib.gis.gdal import SpatialReference from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.geometry.backend import Geometry, GeometryException from django.core.exceptions import ImproperlyConfigured @@ -26,6 +25,7 @@ def get_srid_info(srid, connection): given SRID from the `spatial_ref_sys` (or equivalent) spatial database table for the given database connection. These results are cached. """ + from django.contrib.gis.gdal import SpatialReference global _srid_cache try: