Commit Graph

158 Commits

Author SHA1 Message Date
Baptiste Mispelon 17912522ce Fixed #21504 -- Don't shadow database errors when testing for postgis version.
Thanks to trac user paultag for the report.
2013-11-24 14:34:43 +01:00
Claude Paroz 7e714827ea Don't initialize PostGIS-specific stuff for non-db connections
Refs #16969.
2013-11-09 11:28:16 +01:00
coagulant 3bc0d46a84 Fixed all E261 warnings 2013-11-02 18:20:39 -04:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Alex Gaynor 19256f300e Continue to attack E302 violations 2013-11-02 10:18:46 -07:00
Alex Gaynor b9a90b371c Remove dsome import * 2013-10-26 20:57:08 -07:00
Alex Gaynor b35ff0d920 Fixed all the E203 violations 2013-10-26 18:27:42 -07:00
Alasdair Nicol c3aa2948c6 Fixed #21298 -- Fixed E301 pep8 warnings 2013-10-23 13:45:03 +01:00
Tim Graham ae48d77ef8 Fixed E225 pep8 warnings. 2013-10-23 06:09:29 -04:00
Tim Graham 8e2029f8dd Removed import * in tests.
Thanks to flake8 path/to/file.py | awk -F ' ' '{ print $5 }' | sort | uniq
2013-10-22 08:32:01 -04:00
Alasdair Nicol a800036981 Fixed #21287 -- Fixed E123 pep8 warnings 2013-10-18 10:07:39 +01:00
Alasdair Nicol eb214452c3 Fixed #21270 -- Fixed E701 pep8 warnings 2013-10-17 12:12:40 +01:00
Larry O'Neill 83b9bfea44 Fixed #21266 -- Fixed E201,E202 pep8 warnings. 2013-10-14 18:12:00 -04:00
Claude Paroz 1e8eadc94e Fixed #15888 -- Made tablename argument of createcachetable optional
Thanks Aymeric Augustin for the report and the documentation and
Tim Graham for the review.
2013-10-14 13:24:40 +02:00
Tim Graham 1dae4ac177 Whitespace cleanup.
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
2013-10-10 16:49:20 -04:00
Baptiste Mispelon 20472aa827 Fixed #21189: Cleaned up usage of bare except clauses.
Thanks to berkerpeksag for the report and to claudep
for the review.
2013-10-05 11:50:03 +02:00
Tim Graham f40c82213f Added backwards compatability shims for util modules.
refs #17627
2013-09-16 12:53:42 -04:00
Tim Graham 18ffdb1772 Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
2013-09-16 12:52:05 -04:00
Claude Paroz 4c5641dd92 Fixed inspectdb test for spatialite >=4 2013-09-12 11:14:16 +02:00
Gregor MacGregor b2b763448f Fixed #20841 -- Added messages to NotImplementedErrors
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Alex Gaynor 96fd5557f9 Removed a ton of unused local vars 2013-09-08 08:05:16 -07:00
Andrew Godwin b6a957f0ba Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	docs/ref/django-admin.txt
2013-08-19 18:30:48 +01:00
Harm Geerts 240886183b Fixed #20829 -- Skip postgis metadata tables with introspection 2013-08-16 21:14:29 +02:00
Andrew Godwin de64c4d6e9 Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/core/management/commands/flush.py
	django/core/management/commands/syncdb.py
	django/db/models/loading.py
	docs/internals/deprecation.txt
	docs/ref/django-admin.txt
	docs/releases/1.7.txt
2013-08-09 14:17:30 +01:00
Alex Gaynor 3e0eb2d788 Fixed a number of lint warnings, particularly around unused variables. 2013-08-04 09:17:10 -07:00
Andrew Godwin 68e0a169c4 Rename pre_ and post_syncdb to *_migrate, with aliases from old names 2013-07-30 11:52:52 +01:00
Claude Paroz 550b6195ed Made an aggregate test pass with spatialite backend
backends.tests.SqliteAggregationTests was failing with spatialite.
2013-07-09 19:47:57 +02:00
Alex Gaynor df3d7e66da Replaced some dicts with sets. 2013-07-08 09:48:56 +10:00
Aymeric Augustin ffcf24c9ce Removed several unused imports. 2013-06-19 17:18:40 +02:00
Claude Paroz b14bd60404 Reimplemented PostGIS spatial_version with cached_property 2013-05-27 12:06:56 +02:00
Alex Gaynor a53d7a0a50 Made gis_terms be a set, rather than a dict with None for all keys. 2013-05-09 08:13:13 -07:00
konarkmodi bc4111ba68 Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2013-03-19 15:42:39 -07:00
Aymeric Augustin 4846e2b744 Removed unused imports.
One of these functions didn't exist anymore.
2013-03-12 10:09:04 +01:00
Aymeric Augustin f2f98abb95 Avoided closing the database connection within a transaction.
Refs #9437.
2013-03-11 21:08:49 +01:00
Aymeric Augustin e74e207cce Fixed #17260 -- Added time zone aware aggregation and lookups.
Thanks Carl Meyer for the review.

Squashed commit of the following:

commit 4f290bdb60
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Wed Feb 13 21:21:30 2013 +0100

    Used '0:00' instead of 'UTC' which doesn't always exist in Oracle.

    Thanks Ian Kelly for the suggestion.

commit 01b6366f3c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Wed Feb 13 13:38:43 2013 +0100

    Made tzname a parameter of datetime_extract/trunc_sql.

    This is required to work around a bug in Oracle.

commit 924a144ef8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Wed Feb 13 14:47:44 2013 +0100

    Added support for parameters in SELECT clauses.

commit b4351d2890
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Feb 11 22:30:22 2013 +0100

    Documented backwards incompatibilities in the two previous commits.

commit 91ef84713c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Feb 11 09:42:31 2013 +0100

    Used QuerySet.datetimes for the admin's date_hierarchy.

commit 0d0de288a5
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Feb 11 09:29:38 2013 +0100

    Used QuerySet.datetimes in date-based generic views.

commit 9c0859ff7c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 21:43:25 2013 +0100

    Implemented QuerySet.datetimes on Oracle.

commit 68ab511a4f
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 21:43:14 2013 +0100

    Implemented QuerySet.datetimes on MySQL.

commit 22d52681d3
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 21:42:29 2013 +0100

    Implemented QuerySet.datetimes on SQLite.

commit f6800fd04c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 21:43:03 2013 +0100

    Implemented QuerySet.datetimes on PostgreSQL.

commit 0c829c23f4
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 21:41:08 2013 +0100

    Added datetime-handling infrastructure in the ORM layers.

commit 104d82a777
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Feb 11 10:05:55 2013 +0100

    Updated null_queries tests to avoid clashing with the __second lookup.

commit c01bbb3235
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 23:07:41 2013 +0100

    Updated tests of .dates().

    Replaced .dates() by .datetimes() for DateTimeFields.
    Replaced dates with datetimes in the expected output for DateFields.

commit 50fb7a5246
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 21:40:09 2013 +0100

    Updated and added tests for QuerySet.datetimes.

commit a8451a5004
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 22:34:46 2013 +0100

    Documented the new time lookups and updated the date lookups.

commit 29413eab2b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Feb 10 16:15:49 2013 +0100

    Documented QuerySet.datetimes and updated QuerySet.dates.
2013-02-16 09:19:04 +01:00
Claude Paroz eb9430fc4b Implemented some SpatiaLiteOperations as cached properties
Previously, some properties weren't set unless
confirm_spatial_components_versions() was explicitely called.
2013-01-29 19:39:11 +01:00
Anssi Kääriäinen 86644e065f Refactored gis/spatialite connection initialization
The connection state is now initialized in get_new_connection().
Refs #19274.
2012-11-27 19:47:22 +02:00
Claude Paroz 7b9a1fb964 Fixed cursor commit command in PostGIS backend
Thanks Bruno Renié for noticing the error.
2012-11-23 17:20:36 +01:00
Flavio Curella fbd1df8e16 Fixed #19152 -- Allowed PostGIS tests to be run without template
From version 2, a PostGIS template is no longer required to create
a GIS-enabled database.
2012-11-23 16:06:31 +01:00
Anssi Kääriäinen 92d7f541da Fixed #19058 -- Fixed Oracle GIS crash
The problem is the same as in #10888 which was reintroduced when
bulk_insert was added. Thanks to Jani Tiainen for report, patch and
also testing the final patch on Oracle GIS.
2012-11-15 16:08:06 +02:00
Brian Galey 95f7ea3af1 Fixed #19028 -- Support GeoJSON output with SpatiaLite 3.0+ 2012-10-12 17:23:22 +02:00
Justin Bronn 91ef2a5253 Use native geometry types on PostGIS 2.0+ instead of `AddGeometryColumn` and don't query database in `PostGISCreation.sql_table_creation_suffix`. 2012-10-06 09:57:24 -07:00
Justin Bronn d99639da03 Fixed type in MySQL spatial backend. 2012-10-05 18:49:59 -07:00
Justin Bronn cd99c12f05 Fixed `F()` expression regressions in GeoDjango caused by recent datastructure changes in `SQLEvaluator`. 2012-10-05 18:41:50 -07:00
Claude Paroz 864a0514b8 Cared for PostGIS 2 renamed operations 2012-09-30 22:54:01 +02:00
Flavio Curella 92b5341b19 Fixed #16455 -- Added support for PostGIS 2.0
Thanks ckarrie for the report and the initial patches, Flavio Curella
for updating the patch, and Anssi Kääriäinen for testing. See ticket
for other valuable contributors.
2012-09-30 22:49:41 +02:00
Claude Paroz 874908e3bb [py3] Updated PostGIS adapter 2012-09-23 20:32:52 +02:00
Claude Paroz 690170a8b9 Removed unused quoting/encoding in gis db backend 2012-09-13 20:17:52 +02:00
Julien Phalip 675431dfaa Fixed #17278 -- Enabled the spatialite GIS tests to run without having to specify a database name in the settings. Thanks to Aymeric for the report and to Ramiro for the initial patch. 2012-08-19 02:17:45 -07:00
Aymeric Augustin d4a0b27838 [py3] Refactored __unicode__ to __str__.
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
  python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
  test it under Python 2
2012-08-12 14:44:40 +02:00
Alex Gaynor 4c97101b1f remove a bunch of unnescesarry iterkeys() calls 2012-08-08 07:33:15 -07:00
Aymeric Augustin ee191715ea [py3] Fixed access to dict keys/values/items. 2012-08-07 12:00:22 +02:00
Justin Bronn 1c3464e809 Fixed testing on SpatiaLite 2.4, which has support for `InitSpatialMetaData`. 2012-08-04 18:10:34 -07:00
Claude Paroz 2407c45c18 Removed some pre-1.3.0 postgis compatibility code 2012-08-03 11:27:31 +02:00
Aymeric Augustin bdca5ea345 [py3] Replaced unicode/str by six.text_type/bytes. 2012-07-22 09:29:54 +02:00
Aymeric Augustin 3cb2457f46 [py3] Replaced basestring by six.string_types. 2012-07-22 09:29:54 +02:00
Aymeric Augustin 56dbe924a6 [py3] Removed longs. 2012-07-22 09:29:53 +02:00
Claude Paroz aa423575e7 Fixed #17760 -- Implemented callable database features as cached properties
This does remove the requirement to call features.confirm() method
before checking the properties.
Thanks cdestiger and Ramiro Morales for their work on the patch.
2012-06-09 15:59:52 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Carl Meyer b9bf7cce89 Fixed #15169 -- Added conversion of 0/1 to False/True for MySQL GIS backend. Thanks zmsmith for report, and Ramiro for draft patch and review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17632 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 22:32:22 +00:00
Ramiro Morales ae640e5ea0 Fixed #17796 -- Rolled back [17588] because the fix for the original relatively
corner case (boolean fields under MySQL spatial backend) had a wider scope with
potentially unintended consequences affecting the main MySQL backend and the
required changes wouldn't be appropiate at this point of the 1.4 development
cycle.

Refs #15169.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-29 17:46:23 +00:00
Ramiro Morales d96ffa130e Added file missed in r17588.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-26 16:19:40 +00:00
Ramiro Morales 9f6859e1ea Fixed #15169 -- Corrected handling of model boolean fields in MySQL spatial backend.
Thanks goes to zmsmith and others for reporting the issue and to Justin Bronn for the fix.

Refs #7190, r12578, r12900, #13293, r12939.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-26 14:35:46 +00:00
Ramiro Morales 4b81d790a8 Updated SpatiaLite GeoDjango test setup instructions for version 3.0.
Also, fixed documentation typos introduced in r17496.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 18:01:53 +00:00
Ramiro Morales 5a4e63e62a Removed code duplicated in SQLite3 and SpatiaLite GeoDjango DB backends.
Moved it to an auxiliary method in the SQLite3 backend cursor class.
Did this to reduce the chances of us forgetting to port changes in DB
connection setup process from the former to the latter one like it
happened e.g. in r17205.

Refs #17258.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 03:09:54 +00:00
Ramiro Morales c406b554c7 Added, documented support for SpatiaLite 3.0 to GeoDjango.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 00:40:18 +00:00
Aymeric Augustin d0eb4693ab Fixed #15255 -- Ensured createcachetable honors database routers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19 19:56:31 +00:00
Carl Meyer f91af72523 Fixed #16353 -- don't try to create Site objects on all databases. Refs #15573, #15346. Thanks Aymeric Augustin for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 22:46:48 +00:00
Justin Bronn 67e05fcd39 Fixed #16778 -- Improved escaping of geometries on PostgreSQL, allowing GeoDjango to work on 9.1. Thanks, piro for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-13 20:43:33 +00:00
Justin Bronn 28cb5bf162 Fixed #16231 -- Added support for GML and KML on the SpatiaLite backend. Thanks, steko for the bug report and jpaulett for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 00:52:08 +00:00
Justin Bronn 2918c3de74 Fixed #14648 -- Fixed annotated date querysets when `GeoManager` is used. Thanks, codysoyland, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 22:53:26 +00:00
Justin Bronn 0516ac3d28 Fixed #13670 -- Comparisons with the spatial adapter won't blow up in some corner cases. Thanks, milosu for the bug report and jpaulett for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:29:34 +00:00
Justin Bronn c4d8b4c0b2 Removed extra call to `syncdb` that slipped in with r16749.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:47:18 +00:00
Justin Bronn 43329af2e3 Fixed #16408 -- Fixed conversion of dates, and other problems with the SpatiaLite backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:34:23 +00:00
Jannis Leidel bce890ace4 Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:15 +00:00
Jannis Leidel dc2bfae1e5 Fixed #16531 -- Fixed various instances of "undefined name" issues. Thanks, Bruno Renié.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:39:35 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Jannis Leidel 89c302cf3f Rolled back r16510, r16513 and r16514 because it wasn't ready.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 14:16:37 +00:00
Jannis Leidel 6de65ab76f Fixed #15255 -- Stopped database cache from ignoring database routers when creating the cache table. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 21:53:17 +00:00
Ramiro Morales b7715b4ae6 Fixed #15772 -- Corrected an oversight from r16016 in MySQL GeoDjango DB backend. Thanks JannKleen for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-06 11:19:37 +00:00
Ramiro Morales de5f07513b Tweaked r16016: Removed a now superflous __init__ method in the Oracle GIS backend DatabaseOperations class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05 11:29:16 +00:00
Ramiro Morales 30b3d51599 Fixed #13630 -- Made __init__ methods of all DB backends' DatabaseOperations classes take a `connection` argument. Thanks calexium for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05 00:19:17 +00:00
Adrian Holovaty 71bf169ab1 Fixed geodjango postgis/creation.py to use postgresql_psycopg2 instead of legacy postgresql module that was removed recently
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-04 15:43:56 +00:00
Russell Keith-Magee 673e6fc7fb Fixed #11675 -- Added support for the PyLibMC cache library. In order to support this, and clean up some other 1.3 caching additions, this patch also includes some changes to the way caches are defined. This means you can now have multiple caches, in the same way you have multiple databases. A huge thanks to Jacob Burch for the work on the PyLibMC backend, and to Jannis for his work on the cache definition changes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 15:19:19 +00:00
Justin Bronn cab434e011 Fixed #14653 -- Removed vestigal `getstatusoutput` from GeoDjango utils.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-09 17:39:01 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Justin Bronn 553374b55d Fixed #14060 -- PostGIS never implemented the `~=` operator for geography types, so removed support for it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 02:07:04 +00:00
Russell Keith-Magee 6909c22663 Fixed #13798 -- Added connection argument to the connection_created signal. Thanks to liangent for the report, and Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-30 13:21:18 +00:00
Justin Bronn aaa5dfbf53 Fixed #13967 -- MySQL spatial backend now respects when `spatial_index=False`. Thanks, Simon Law, for bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-21 15:23:18 +00:00
Justin Bronn 402f8cede5 Fixed #13315, #13430 -- Recreated `django.contrib.gis.db.backend` module 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
2010-05-04 21:43:40 +00:00
Justin Bronn 82b8b67446 Fixed #9437 -- Now close the connection after getting the PostGIS version during spatial backend initialization.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-11 18:59:03 +00:00
Justin Bronn 7bdb9a90d0 PostGIS 1.5 allows distance queries on non-point geographic geometry columns with `ST_Distance_Sphere`, enabled this functionality.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-30 23:15:43 +00:00
Justin Bronn 85fa7d8894 Fixed #13070 -- Introduced fallback code to detect SpatiaLite 2.3.0 versions (which do not have `spatialite_version` function).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 19:40:59 +00:00
Justin Bronn 901b60e7e1 Now look for `DatabaseError` during PostGIS backend initialization, as it is now raised instead of a `ProgrammingError` after changes in r12352.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 17:58:55 +00:00
Justin Bronn 5b21033847 Added `reverse` and `force_rhr` methods to `GeoQuerySet`. Refs #12416.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 02:20:58 +00:00
Justin Bronn 9a8449afe1 Fixed #12605 -- Removed redundant import of `ImproperlyConfigured`. Thanks, tmcw.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 18:55:36 +00:00
Justin Bronn 474ce51ffd Fixed #12690 -- Fixed SQL template used for Oracle's with `SDO_RELATE` function, added `truncate_params` attribute to spatial backend, and re-enabled the `relate` lookup tests. Thanks, jtiai, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26 17:32:11 +00:00
Justin Bronn 6b659270d6 Fixed problems associated with the `GeometryField` SRID cache: it is now keyed by the connection alias rather than the spatial backend name (e.g., `spatial_ref_sys` tables may have different entries, even if backend is the same), explicitly pass in connection alias to `SpatialRefSys` query to ensure correct entry is retrieved, and removed unused code from `GeometryField.get_distance`. Thanks, Josh Livni, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-18 21:49:13 +00:00