1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #28160 -- Prevented hiding GDAL exceptions when it's not installed.

This commit is contained in:
Tim Graham
2017-05-02 21:27:11 -04:00
parent 890537253c
commit 2dc3280254
18 changed files with 118 additions and 182 deletions

View File

@@ -3,7 +3,7 @@ import json
from django.contrib.gis.db.models.fields import BaseSpatialField
from django.contrib.gis.db.models.functions import Distance
from django.contrib.gis.db.models.lookups import DistanceLookupBase, GISLookup
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.gdal import GDALRaster
from django.contrib.gis.geos import GEOSGeometry
from django.contrib.gis.measure import D
from django.contrib.gis.shortcuts import numpy
@@ -11,10 +11,7 @@ from django.db.models import Q
from django.test import TransactionTestCase, skipUnlessDBFeature
from ..data.rasters.textrasters import JSON_RASTER
if HAS_GDAL:
from django.contrib.gis.gdal import GDALRaster
from .models import RasterModel, RasterRelatedModel
from .models import RasterModel, RasterRelatedModel
@skipUnlessDBFeature('supports_raster')