Opened 14 years ago

Closed 14 years ago

#12591 closed (fixed)

django.contrib.gis.utils.srs is out of date

Reported by: Charlie DeTar Owned by: nobody
Component: GIS Version: dev
Severity: Keywords: srs add_postgis_srs
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django.contrib.gis.utils.srs.add_postgis_srs fails with the following error:

ImportError                               Traceback (most recent call last)
/usr/local/lib/python2.6/dist-packages/django/contrib/gis/utils/srs.pyc in add_postgis_srs(srs, auth_name, auth_srid, ref_sys_name)
     22                    determined by GDAL.
     23     """
---> 24     from django.contrib.gis.db.backend import SpatialBackend
     25     from django.contrib.gis.models import SpatialRefSys
     26     from django.contrib.gis.gdal import SpatialReference

ImportError: No module named backend

This is because the django.contrib.gis.db.backend module no longer exists (it has been renamed "backends"), and the SpatialBackend class is no longer defined.

Thus the following instructions in geodjango documentation fail:
http://geodjango.org/docs/install.html#add-google-projection-to-spatial-ref-sys-table

Change History (1)

comment:1 by jbronn, 14 years ago

Resolution: fixed
Status: newclosed

(In [12228]) Fixed #12591 -- Renamed add_postgis_srs to add_srs_entry (keeping backwards-compatible alias), added database keyword for multi-db, removed deprecated SpatialBackend references; no longer use get_or_create and look for existing entry based on SRID value.

Note: See TracTickets for help on using tickets.
Back to Top