Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ule with `SpatialBackend` alias and added `Adaptor` alias for backwards-compatibility purposes; added GeoDjango 1.2 backwards-incompatibility documentation and release notes; added a section in the docs about how MySQL is a crippled spatial database; updated versions in install docs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
- Loading branch information
Showing
12 changed files
with
226 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from django.db import connection | ||
|
||
if hasattr(connection.ops, 'spatial_version'): | ||
from warnings import warn | ||
warn('The `django.contrib.gis.db.backend` module was refactored and ' | ||
'renamed to `django.contrib.gis.db.backends` in 1.2. ' | ||
'All functionality of `SpatialBackend` ' | ||
'has been moved to the `ops` attribute of the spatial database ' | ||
'backend. A `SpatialBackend` alias is provided here for ' | ||
'backwards-compatibility, but will be removed in 1.3.') | ||
SpatialBackend = connection.ops | ||
|
||
from django.db import connection | ||
|
||
if hasattr(connection.ops, 'spatial_version'): | ||
from warnings import warn | ||
warn('The `django.contrib.gis.db.backend` module was refactored and ' | ||
'renamed to `django.contrib.gis.db.backends` in 1.2. ' | ||
'All functionality of `SpatialBackend` ' | ||
'has been moved to the `ops` attribute of the spatial database ' | ||
'backend. A `SpatialBackend` alias is provided here for ' | ||
'backwards-compatibility, but will be removed in 1.3.') | ||
SpatialBackend = connection.ops | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django.db import connection | ||
|
||
if (hasattr(connection.ops, 'spatial_version') and | ||
not connection.ops.mysql): | ||
# Getting the `SpatialRefSys` and `GeometryColumns` | ||
# models for the default spatial backend. These | ||
# aliases are provided for backwards-compatibility. | ||
SpatialRefSys = connection.ops.spatial_ref_sys() | ||
GeometryColumns = connection.ops.geometry_columns() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.