Commit Graph

168 Commits

Author SHA1 Message Date
Julien Phalip 1794e36fa1 Skip GeometryFieldTest if there's no spacial database. 2012-06-16 13:57:33 -07:00
Claude Paroz 023b70415b Executed SpatialRefSysTest only with spatial backend 2012-06-14 21:44:08 +02:00
Claude Paroz 88601bad84 Discovered some geodjango tests with standard mechanism
No need to special case tests discovery for regular first-level
gis tests.
2012-06-14 21:10:30 +02:00
Claude Paroz 4d46106f8c Fixed #17754 -- Refactored gis.measure
This refactoring does allow much easier MeasureBase subclassing.
Many thanks to Ricardo di Virgilio for the initial patch.
2012-06-14 15:32:42 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz 9c096ab981 Fixed #17328 -- Added OpenLayersWidget _has_changed method
Thanks Will Hardy for the report and the patch.
2012-06-06 10:42:14 +02:00
Claude Paroz c2139bbcef Updated WMS URL in geoadmin test. 2012-05-26 00:02:15 +02:00
Claude Paroz ce8f874b88 Fixed #14886 -- Added wms_options dict to GeoModelAdmin.
It is now possible to set WMS options by overriding wms_options
in a subclass of GeoModelAdmin.
Thanks slinkp for the report and the initial patch.
2012-05-25 21:00:44 +02:00
Claude Paroz f4abba5200 Fixed #18367 -- Allowed LayerMapping to store strings in TextField.
Thanks geoffhing@gmail.com for the report.
2012-05-24 09:57:22 +02:00
Claude Paroz f1ebcdc7c2 Modernized contrib.gis layermapping tests.
In particular, make tests independent of each other.
2012-05-24 09:52:06 +02:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz b52672d778 Replaced deprecated TestCase methods. Refs #17049. 2012-05-03 16:39:16 +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
Ramiro Morales 7d5979f953 Removed broken function-based custom test runner in GeoDjango
We forgot to delete it during the 1.4 development cycle.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-01 21:03:50 +00:00
Ramiro Morales ecc8208f88 Removed executable bits from some files that don't need them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-09 12:13:31 +00: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
Adrian Holovaty 2ade1e916f Edited stuff from [17543] to [17629]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 17:16:52 +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 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 d72d5ce827 Fixed #16409 (again, this time for GeoDjango).
Thanks Aymeric Augustin for the regression test and Petr Gorodechnyj for
the patch.

Refs r16522.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 13:50:27 +00:00
Alex Gaynor 66210cbc70 Remove a great many of the remaining relative imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 18:45:22 +00:00
Justin Bronn e5aeba018f Updated geoadmin tests to reflect that OSM js is no longer required as of r16847.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-18 22:28:17 +00:00
Justin Bronn 3ac877840a Fixed #15277 -- Cleaned up `ogrinspect` command, added tests and extended support beyond file-based OGR data sources. Thanks, willinoed for bug report and jpaulett for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-17 19:54:52 +00:00
Ramiro Morales 26b8122087 Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
This applies to both our own [test] code and documentation examples. Also:
 * Moved the functions and handlers from `django.conf.urls.defaults` up to
   `django.conf.urls` deprecating the former module.
 * Added documentation for `handler403`.
 * Tweaked the URLs topic document a bit.

Thanks to pupeno and cdestigter for their great work contributing patches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +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 a25413bf86 Fixed #15305 -- Made `Count` aggregate and `.values()` play nice together on `GeoQuerySets`. Thanks, vrehak for the bug report and milosu for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 00:00:15 +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 05e29716b4 Fixed #16553 -- Refactored the `GeoIP` module, moving it `django.contrib.gis.geoip`; fixed memory leaks, and encoding issues.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 18:04:27 +00:00
Justin Bronn eaea9deca8 Fixed #16790 -- Modified the geographic admin to work after r16594. Thanks, jdiego, for the bug report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 03:04:30 +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 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
Justin Bronn 6273db307e Fixed a brittle test in the `LayerMapping` tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 19:51:06 +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 12b7c2a702 Fixed #15707 -- Made the GIS feed compatible to the class based feeds and introduced a little helper view that works like the previous feed view in the syndication app which was removed in r15976.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:36:07 +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
Russell Keith-Magee 765458363b Advanced deprecations in contrib.gis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:34:50 +00:00
Justin Bronn abab0742d0 Fixed integer overflows that occurred when `OFTReal` fields were treated as `OFTInteger`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 16:56:53 +00:00
Justin Bronn 83246ca8b9 Fixed tests broke in r15926.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 16:46:24 +00:00
Adrian Holovaty a87be3554f Removed a bunch of Python 2.4 workarounds now that we don't support it. Refs #15702 -- thanks to jonash for the patch. Splitting this over muliple commits to make it more manageable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 01:40:43 +00:00
Justin Bronn d60a8777c1 Add `setUp` and `tearDown` methods to the geographic feed and sitemap tests to ensure `Site` exists for tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 18:22:52 +00:00
Justin Bronn 1fdbcadd22 Fixed #15378 -- Now properly handle OGR layers that have features with invalid geometries. Thanks, kunitoki for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 02:26:37 +00:00
Justin Bronn ab7ada16ed Fixed brittle tests that broke with release of GDAL 1.8.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 21:15:34 +00:00
Russell Keith-Magee afd040d4d3 Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue
 assertEquals -> assertEqual
 failUnless -> assertTrue

For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Russell Keith-Magee 01c42cbb99 Fixed #15358 -- Renamed a test to avoid a naming collision. Thanks to mila for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-20 23:43:55 +00:00
Justin Bronn d66ab474f3 Fixed #10420 -- GeoDjango tests are run as part of Django tests when using spatial database backends with `runtests.py`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 23:42:12 +00:00
Justin Bronn 0f879195a6 GeoDjango test suite housekeeping. Moved data into fixtures for `relatedapp` and `distapp` tests, and made both use Django's `TestCase`; moved functionality out of `GeoDjangoTestSuiteRunner` to allow future re-use in `runtests.py` (refs #10420); compressed test app fixtures and cleaned up imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-02 05:58:21 +00:00
Justin Bronn 7592d68541 Now possible to run the GeoDjango test suite with a minimal settings file. Refs #10420, #14439.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-20 23:54:59 +00:00
Justin Bronn 1ee4274ff1 Fixed some a stale location and whitespace in GeoIP tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 22:18:22 +00:00
Justin Bronn 315ae1ce6e Fixed regression introduced in r13755 that prevented the running of the GEOS/GDAL test suites without configuring Django settings; moved reference geometry data from Python module to compressed JSON fixture; put in workaround in tests for GDAL bug #3783.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 21:56:48 +00:00
Justin Bronn 120aae2209 Enabled area calculations for geography columns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 17:13:27 +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
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +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
Justin Bronn f6074506fd Fixed regression in running the GeoDjango test suite after r13670 with addition of `GeoDjangoTestSuiteRunner` (replaces `run_gis_tests`, which is now a stub).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 01:40:42 +00:00
Justin Bronn 87a60e28cc Fixed #13934 -- `GeoSQLCompiler.get_default_columns` was missing `local_only` keyword argument. Thanks, Simon Law, for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-20 19:05:46 +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 7e5265785a Fixed #10594 -- `GeoQuerySet` measurment methods no longer crash on geometry fields with NULL values. Thanks, whiteinge for the bug report and yourcelf for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-29 22:20:38 +00:00
Justin Bronn 0741fb6507 Fixed geographic feed test failure due to `Rss201rev2Feed` additions in r12338.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 18:07:49 +00:00
Justin Bronn 72c39410c8 Renamed `reverse` to `reverse_geom` because of clash with existing `QuerySet` method; added `GeoQuerySet.geohash` support for producing GeoHash reprsentations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 02:46:07 +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 ff6b44980a `GeoQuerySet.distance` now allows calculations to/from non-point geodetic geometry fields as allowed on PostGIS 1.5.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 23:09:46 +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
Adrian Holovaty 5ceed0a053 Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:36:20 +00:00
Justin Bronn a488589461 Fixed #12344 -- Using `select_related()` on geographic fields with the Oracle spatial backend now works.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-29 10:18:56 +00:00
Justin Bronn ac6273d675 Fixed `LayerMapping` to work with PostGIS geography fields; removed `LayerMapping.geometry_column` and replaced with `LayerMapping.geometry_field` because getting the `geometry_columns` entry was completely unnecessary, and only the geometry field instance is needed; cleaned up and fleshed out the `geogapp` tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-25 14:37:57 +00:00
Justin Bronn e1f6b4b82f Added tests for PostGIS geography support; added `proj_version_tuple` to PostGIS spatial backend operations; made `distapp` tests take into account different datums in PROJ.4 4.7; and added svn:ignore properties for recently-added directories.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-23 20:45:08 +00:00
Russell Keith-Magee ff60c5f9de Fixed #1142 -- Added multiple database support.
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.

Big thanks also go to:
 * Justin Bronn for keeping GIS in line with the changes,
 * Karen Tracey and Jani Tiainen for their help testing Oracle support
 * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
 * Malcolm Treddinick for his guidance during the GSoC submission process.
 * Simon Willison for driving the original design process
 * Cal Henderson for complaining about ponies he wanted.

... and everyone else too numerous to mention that helped to bring this feature into fruition.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Jacob Kaplan-Moss 574eafe4c0 Fixed #11753 - Q objects with callables no longer explode on Python 2.4. Thanks, Jeremy Dunck.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:06:41 +00:00
Justin Bronn fed3081caf Fixed #12390 -- `Distance` and `Area` objects now support multiplication when they are the right-hand side.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 18:21:30 +00:00
Justin Bronn cd0d7e676d As promised, removed the `_DeprecatedTestModule` and its instances.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-17 02:13:26 +00:00
Justin Bronn 32d0730b89 Fixed #11433 -- 3D geometry fields are now supported with PostGIS; EWKB is now used by `PostGISAdaptor`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-16 18:49:00 +00:00
Justin Bronn c169f8cb17 `OGRGeomType` now recognizes 2.5D types, and removes need for unnecessary workaround in `Layer.geom_type`; corrected geometry type in test VRT file. Refs #11433.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-14 23:25:44 +00:00
Justin Bronn ef65854a77 Fixed a brittle test case that was failing on PostGIS versions < 1.4.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 03:51:05 +00:00
Justin Bronn 36fe303e35 Added `ewkb` and `hexewkb` properties to `GEOSGeometry`. Refs #11433, #12010.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 03:35:25 +00:00
Justin Bronn be89c9abab Fixed #12093 -- `LayerMapping` now takes into account model inheritance when looking for the geometry column; forgot to diable extent regression test on MySQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-02 02:17:56 +00:00
Justin Bronn 62180a6b44 Fixed #11827: Can now calculate extent in Oracle on tables with one point.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-13 17:40:46 +00:00
Justin Bronn 1aef132090 Fixed #11624: `render_to_kmz` no longer balks on non-ASCII data.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-12 18:35:08 +00:00
Justin Bronn 1707304bad Fixed test cases and `GeoQuerySet.geojson` to support PostGIS 1.4.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-27 04:21:31 +00:00
Justin Bronn 53b8809277 Fixed #11489 -- `GeoQuery.resolve_columns` now recognizes annotations; disabled problematic test cases on Oracle and added notes on why.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 22:38:22 +00:00
Justin Bronn 33ea28c2b2 Forgot to add the `collect` GeoQuerySet method to correspond to the `Collect` aggregate object; also added tests for this operation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-11 20:34:27 +00:00
Justin Bronn fdcc0c774a Fixed #11381 -- `GeoManager` + `select_related` + nullable `ForeignKey` now works correctly. Thanks, bretthoerner for ticket and dgouldin for initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 16:31:21 +00:00
Justin Bronn 4cb4086b2a Fixed #11245, #11246 -- Fixed validity check of `GeoIP` pointers and leaking of their references; also clarified initialization, fixed a stale test, added comments about version compatibility, and did some whitespace cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-11 02:45:46 +00:00
Justin Bronn be907bcdcb Fixed #11087 -- Fixed the `Count` annotation when used with `GeoManager`. Thanks to dgouldin for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-03 04:49:16 +00:00
Justin Bronn cb5e8e29f0 Removed module-level imports from `django.test` -- this prevented running the GEOS, GDAL tests from outside a Django environment (e.g., when there's no `settings.py`).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-02 16:17:36 +00:00
Justin Bronn 66db0b43ad Fixed #10660 -- `GeometryField` no longer requires `srid`/`null` keywords, and now respects `required`; coordinate transformations now done inside `gis.forms.GeometryField` -- benefit being that `OSMGeoAdmin` no longer requires 900913 entry in `spatial_ref_sys` thus enabling it to work with MySQL/Oracle spatial backends; added tests for geographic forms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-25 18:24:32 +00:00
Justin Bronn 44c062344f Fixed #10888 -- May now insert NULL `GeometryField` values on Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-24 20:24:50 +00:00
Justin Bronn 037ce4318b Fixed #10839 -- `GeoQuery` now unpickles properly on Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-21 22:35:04 +00:00
Justin Bronn be11bd40d4 Fixed #10832 -- now use `reorder_suite` in GeoDjango test runner, thanks seanl for ticket & patch; restored original ordering of GEOS tests, as placing last no longer necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-19 23:07:24 +00:00
Justin Bronn aeaba06bf4 Fixed #10791 -- The GeoDjango test runner now respects the `--noinput` command-line option, thanks to seanl for ticket & patch; replaced docstring with URL to latest documentation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-19 22:49:15 +00:00
Justin Bronn bd8afb1894 Fixed #10807 - `GeoWhereNode` no longer passes `Constraint` objects to where they shouldn't go.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-14 19:14:32 +00:00
Justin Bronn f146132831 No longer create tables for unnecessary applications when running the GeoDjango test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 19:19:19 +00:00
Justin Bronn a6356cad4d Fixed #10757 -- Fixed improper selection of primary keys across relations when using `GeoManager.values`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 21:18:41 +00:00
Justin Bronn 2ec48a1dd9 Now support SVG output in SpatiaLite; added tests for SVG output.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 20:12:08 +00:00
Malcolm Tredinnick dded5f52cc Fixed #10695 -- Fixed implementation of deferred attribute retrieval.
The original implementation had a few silly bugs in it that meant that data was
not being used only on the instance of the class that it was appropriate for
(one of the traps when using class-level things). No more!

Thanks to Justin Bronn and Alex Gaynor for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 03:21:31 +00:00
Justin Bronn 8d42902f19 Fixed #9745 -- Added the `GeoQuerySet` methods `snap_to_grid` and `geojson`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 16:50:44 +00:00
Justin Bronn c398566aa2 Forgot to include the SpatiaLite test SQL files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 16:06:22 +00:00
Justin Bronn 03de1fe5f4 Fixed #9871 -- Geometry objects are now returned in dictionaries and tuples returned by `values()` and `values_list()`, respectively; updated `GeoQuery` methods to be compatible with `defer()` and `only`; removed defunct `GeomSQL` class; and removed redundant logic from `Query.get_default_columns`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 16:01:50 +00:00
Justin Bronn 8eca2df3a4 Fixed #9686 -- SpatiaLite is now a supported spatial database backend. Thanks to Matthew Hancher for initial patch and hard work in implementing this feature.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:15:41 +00:00
Justin Bronn 867e71501c Refactored and cleaned up parts of the spatial database backend. Changes include:
* Laid foundations for SpatiaLite support in `GeoQuerySet`, `GeoWhereNode` and the tests.
* Added the `Collect` aggregate for PostGIS (still needs tests).
* Oracle now goes to 11.
* The backend-specific `SpatialRefSys` and `GeometryColumns` models are now attributes of `SpatialBackend`.
* Renamed `GeometryField` attributes to be public that were private (e.g., `_srid` -> `srid` and `_geom` -> `geom_type`).
* Renamed `create_test_db` to `create_test_spatial_db`.
* Removed the legacy classes `GeoMixin` and `GeoQ`.
* Removed evil `\` from spatial backend fields.
* Moved shapefile data from `tests/layermap` to `tests/data`.

Fixed #9794.  Refs #9686.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 17:15:49 +00:00
Justin Bronn 91ebe9acae Fixed error when trying to import the GEOS tests from their new location.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 04:26:56 +00:00