mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed django.contrib.gis.geometry.backend.
The layer of indirection is unchanged and undocumented
since its introduction in ff60c5f9de.
This commit is contained in:
@@ -8,16 +8,6 @@ try:
|
||||
HAS_POSTGRES = True
|
||||
except ImportError:
|
||||
HAS_POSTGRES = False
|
||||
except ImproperlyConfigured as e:
|
||||
# If psycopg is installed but not geos, the import path hits
|
||||
# django.contrib.gis.geometry.backend which will "helpfully" convert
|
||||
# an ImportError into an ImproperlyConfigured.
|
||||
# Here, we make sure we're only catching this specific case and not another
|
||||
# ImproperlyConfigured one.
|
||||
if e.args and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'):
|
||||
HAS_POSTGRES = False
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
if HAS_POSTGRES:
|
||||
|
||||
Reference in New Issue
Block a user