mirror of
https://github.com/django/django.git
synced 2024-12-28 12:06:22 +00:00
[1.8.x] Moved imports in GIS tests to avoid failure if dependencies aren't installed.
Backport of 1e219ac62f
from master
This commit is contained in:
parent
56015c01c4
commit
1ee18a6046
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from django.contrib.gis.db.models import Extent
|
||||
from django.contrib.gis.geos import HAS_GEOS
|
||||
from django.contrib.gis.shortcuts import render_to_kmz
|
||||
from django.contrib.gis.tests.utils import no_oracle
|
||||
@ -11,6 +10,7 @@ from django.db.models import Count, Min
|
||||
from django.test import TestCase, skipUnlessDBFeature
|
||||
|
||||
if HAS_GEOS:
|
||||
from django.contrib.gis.db.models import Extent
|
||||
from .models import City, PennsylvaniaCity, State, Truth
|
||||
|
||||
|
||||
|
@ -5,7 +5,6 @@ from tempfile import NamedTemporaryFile
|
||||
|
||||
from django.db import connection
|
||||
from django.contrib.gis import gdal
|
||||
from django.contrib.gis.db.models import Extent, MakeLine, Union
|
||||
from django.contrib.gis.geos import HAS_GEOS
|
||||
from django.contrib.gis.tests.utils import no_oracle, oracle, postgis, spatialite
|
||||
from django.core.management import call_command
|
||||
@ -14,6 +13,7 @@ from django.utils import six
|
||||
from django.utils.deprecation import RemovedInDjango20Warning
|
||||
|
||||
if HAS_GEOS:
|
||||
from django.contrib.gis.db.models import Extent, MakeLine, Union
|
||||
from django.contrib.gis.geos import (fromstr, GEOSGeometry,
|
||||
Point, LineString, LinearRing, Polygon, GeometryCollection)
|
||||
from .models import Country, City, PennsylvaniaCity, State, Track, NonConcreteModel, Feature, MinusOneSRID
|
||||
|
Loading…
Reference in New Issue
Block a user