Commit Graph

890 Commits

Author SHA1 Message Date
Tim Graham 8606bea3bc Fixed JavaScript space-before-function-paren violations. 2015-07-18 06:57:10 -04:00
Tim Graham ac6164948e Fixed JavaScript "curly" violations. 2015-07-18 06:57:10 -04:00
Thomas Stephenson 035b0fa60d Fixed #24716 -- Deprecated Field._get_val_from_obj()
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
2015-07-14 09:13:22 -04:00
Claude Paroz d72f8862cb Fixed #25072 -- Prevented GDALRaster memory to be uncollectable
Setting GDALRaster.bands as a cached property was creating a circular
reference with objects having __del__ methods, which means the memory
could never be freed.
Thanks Daniel Wiesmann for the report and test, and Tim Graham for the review.
2015-07-10 19:56:17 +02:00
Trey Hunner ec4f219ecb Fixed #22463 -- Added code style guide and JavaScript linting (EditorConfig and ESLint) 2015-06-27 16:36:26 -04:00
Tim Graham 7da3923ba0 Sorted imports in __init__.py files. 2015-06-27 11:53:33 -04:00
Greg Chapple 4a66a69239 Fixed #24887 -- Removed one-arg limit from models.aggregate 2015-06-27 11:44:33 -04:00
Claude Paroz 60879a2193 Loaded real destructor functions before garbage time
This is an alternative patch to the unsuccessful b43b27bcd.
2015-06-26 13:41:48 +02:00
Claude Paroz ad82d0003b Revert "Reverted lazy initialization of GIS destroy functions"
This reverts commit b43b27bcdf.
This commit broke tests initialization on systems without GIS libraries.
2015-06-25 23:37:36 +02:00
Claude Paroz b43b27bcdf Reverted lazy initialization of GIS destroy functions
Partial revert of 61d09e61. At __del__ time, it might be to late to bind
those functions.
2015-06-25 21:05:48 +02:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Daniel Wiesmann c078021555 Refs #24840 -- Added GDALRaster Warp and transform methods
Thanks to Tim Graham for the review.
2015-06-24 18:31:22 +02:00
Daniel Wiesmann c0fff64486 Fixed #25011, Refs #23804 -- Added check for GDAL on RasterField initialization 2015-06-23 16:11:42 -04:00
Claude Paroz ffdf507ec0 Added GDAL 2.0 support 2015-06-20 14:40:50 +02:00
Daniel Wiesmann b769bbd4f6 Fixed #23804 -- Added RasterField for PostGIS.
Thanks to Tim Graham and Claude Paroz for the reviews and patches.
2015-06-19 14:36:43 -04:00
Tim Graham 3872a33132 Fixed #24979 -- Removed usage of inspect.getargspec(). 2015-06-15 13:43:22 -04:00
Tim Graham 4b600ed244 Removed django.utils.functional.total_ordering() 2015-06-15 13:15:24 -04:00
Sylvain Fankhauser 0a89915783 Fixed #24862 -- Improved PostGIS database connection error message
Thanks brycenesbitt for the patch.
2015-06-05 21:58:30 +02:00
Tim Graham 0eaef8e527 Added contrib.gis.admin.__all__ 2015-05-15 09:41:44 -04:00
Piotr Jakimiak 4157c502a5 Removed unnecessary arguments in .get method calls 2015-05-13 20:51:18 +02:00
Claude Paroz d1df1fd2bb Fixed #24207 -- Added 25D-type geometry field support to ogrinspect
Thanks Michael Diener for the report and sample data, and Tim Graham
for the review.
2015-05-06 20:31:36 +02:00
Tim Graham 783572abc4 Fixed #24750 -- Updated two contrib.gis comment links 2015-05-06 12:01:56 -04:00
Tim Graham 3c4fca271b Fixed #24724 -- Fixed GIS initialization crash on Windows. 2015-05-01 15:47:34 -04:00
Claude Paroz 6aed5cfc6f Updated translations from Transifex
Updates for languages: Indonesian, Belarusian, Persian, and Dutch.
Forward port of cb370f8510 from stable/1.8.x
2015-04-30 14:29:08 +02:00
Tim Graham 26996e2d55 Fixed #24499 -- Dropped support for PostGIS 1.5. 2015-04-25 12:21:16 -04:00
Claude Paroz a37dcfd0a3 Delayed GDAL check for OSMGeoAdmin 2015-04-24 20:30:23 +02:00
Claude Paroz b695153852 Rearranged imports in geos files 2015-04-24 20:30:23 +02:00
Claude Paroz d9bcba9b29 Removed many HAS_GEOS conditional imports 2015-04-24 20:30:23 +02:00
Claude Paroz 61d09e61f5 Lazy loading of GEOS functions 2015-04-24 20:30:23 +02:00
Claude Paroz 6d685b1674 Fixed failures with older Spatialite versions 2015-04-23 18:54:07 +02:00
Claude Paroz ea27e26b09 Deprecated legacy GeoManager/GeoQuerySet methods 2015-04-22 19:54:17 +02:00
Claude Paroz 71e20814fc Added MySQL support to GIS functions 2015-04-22 19:54:17 +02:00
Claude Paroz 44bdbbc316 Added Spatialite support to GIS functions 2015-04-22 19:54:17 +02:00
Claude Paroz d9ff5ef36d Fixed #24214 -- Added GIS functions to replace geoqueryset's methods
Thanks Simon Charette and Tim Graham for the reviews.
2015-04-22 19:54:17 +02:00
Anssi Kääriäinen fb5c7748da Fixed #24615 -- ordering by expression not part of SELECT
Fixed queries where an expression was used in order_by() but the
expression wasn't in the query's select clause (for example the
expression could be masked by .values() call)

Thanks to Trac alias MattBlack85 for the report.
2015-04-16 09:40:47 +02:00
Tim Graham c7679f1b58 Removed unused methods in GIS adapter. 2015-04-09 08:57:29 -04:00
Claude Paroz 88dfe544f6 Fetched updated contrib translations from Transifex
Forward port of 5483c66f85 from stable/1.8.x
2015-04-01 19:51:50 +02:00
Moritz Sichert 1f2abf784a Fixed #24469 -- Refined escaping of Django's form elements in non-Django templates. 2015-03-27 19:46:20 -04:00
Anssi Kääriäinen 8f30556329 Renamed Field.rel attribute to remote_field
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.

In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
2015-03-25 08:16:12 -04:00
Daniel Wiesmann 0d9b018e07 Fixed gis test failures when numpy isn't installed.
Thanks to Bas Peschier for pointing this out. Refs #23804.
2015-03-20 13:42:55 -04:00
Tim Graham 02d78bb1a8 Fixed build failure introduced by refs #23757. 2015-03-18 18:46:06 -04:00
Claude Paroz 65129aac07 Fixed #23757 -- Added 3D introspection support to Spatialite backend
Thanks Tim Graham for the review.
2015-03-18 19:27:44 +01:00
Claude Paroz 465edf2bb2 Updated translation catalogs
Strings are frozen in anticipation of the Django 1.8 release.
Forward port of 1cd2584c98 from stable/1.8.x
2015-03-18 09:31:00 +01:00
Josh Smeaton 88d798d71a Refs #24485 -- Renamed some expression types 2015-03-17 08:40:18 -04:00
Daniel Wiesmann b9cb81570e Made SRID a required parameter for GDALRaster instantiation; refs #23804.
Earlier versions of GDAL do not allow the srid to be set to 0,
so it should be a required parameter to ensure compatibility.
2015-03-17 08:16:12 -04:00
Daniel Wiesmann f269c1d6f6 Added write support for GDALRaster
- Instantiation of GDALRaster instances from dict or json data.
- Retrieve and write pixel values in GDALBand objects.
- Support for the GDALFlushCache in gdal C prototypes
- Added private flush method to GDALRaster to make sure all
  data is written to files when file-based rasters are changed.
- Replaced ``ptr`` with ``_ptr`` for internal ptr variable

Refs #23804. Thanks Claude Paroz and Tim Graham for the reviews.
2015-03-16 19:37:43 +01:00
Tim Graham 21ffbb06ec Fixed #24480 -- Marked strings in contrib.gis templates for translation. 2015-03-14 14:46:09 -04:00
Marc Tamlyn 32d4db66b9 Update converters to take a consistent set of parameters.
As suggested by Anssi. This has the slightly strange side effect of
passing the expression to Expression.convert_value has the expression
passed back to it, but it allows more complex patterns of expressions.
2015-02-20 11:35:52 +00:00
Tim Graham ad0be620ae Moved contrib.gis tests out of contrib. 2015-02-11 10:29:54 -05:00
Daniel Wiesmann 32ed4c202f Moved numpy import helper to shortcuts
Numpy will be used in both the geos and gdal modules,
so the import should sit in the parent module gis.
2015-02-09 15:51:19 +01:00
Collin Anderson db77915c9f Fixed E265 comment style 2015-02-06 09:30:35 -05:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Claude Paroz a0b5f15ea5 Fixed #14483 -- Allowed using subqueries with GIS lookups 2015-01-30 20:27:18 +01:00
Loic Bistuer 4c3bfe9053 Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
2015-01-30 22:02:58 +07:00
Josh Smeaton 8196e4bdf4 Fixed #24154 -- Backends can now check support for expressions 2015-01-27 12:20:06 +11:00
Tim Graham 1e219ac62f Moved imports in GIS tests to avoid failure if dependencies aren't installed. 2015-01-23 16:03:30 -05:00
Adam Taylor 039465a6a7 Fixed typos in code comments. 2015-01-20 12:18:03 -05:00
Tim Graham 2b039d966f Removed obsolete SQL generation methods. 2015-01-18 15:58:06 -05:00
Claude Paroz aff0e54d51 Fixed PostGIS crosses lookup and added crosses test 2015-01-17 15:44:49 +01:00
Tim Graham 9ce36512fa Removed backwards compatibility shims for "util" modules per deprecation timeline.
refs #17627.
2015-01-17 07:40:12 -05:00
Claude Paroz 428c884083 Used features in GIS sitemap view conditionals 2015-01-17 12:41:18 +01:00
Claude Paroz 53e1423eda Updated en translation catalogs
Forward port of 666c12e52 from stable/1.8.x
2015-01-17 11:19:37 +01:00
Claude Paroz d69ecf922d Complemented test about non-supported aggregation exception 2015-01-17 10:01:55 +01:00
Sander Smits 374c2419e5 Tested that geo aggregates support slicing
Refs #15101. Patch slightly reworked by Claude Paroz.
2015-01-16 20:10:25 +01:00
Claude Paroz a79e6b6717 Fixed #24152 -- Deprecated GeoQuerySet aggregate methods
Thanks Josh Smeaton and Tim Graham for the reviews.
2015-01-16 19:53:02 +01:00
Claude Paroz a34fba5e59 Simplified a bit GeoAggregate classes
Thanks Josh Smeaton for the review. Refs #24152.
2015-01-16 10:40:45 +01:00
Claude Paroz 67bcae1e58 Moved check_aggregate_support to BaseSpatialOperations 2015-01-14 22:03:41 +01:00
Tim Graham 28308078f3 Fixed #22603 -- Reorganized classes in django.db.backends. 2015-01-14 14:16:20 -05:00
Claude Paroz e084ff01f2 Fixed #24136 -- Prevented crash when convert_extent input is None
Thanks Max Demars for the report.
2015-01-13 17:27:11 +01:00
Collin Anderson 58833f5197 Made Django's templates get their own LANGUAGE_* variables.
Refs #24117
2015-01-12 10:54:59 -05:00
Claude Paroz b86107ced1 Fixed #24114 -- Improved error message in GEOSGeometry constructor 2015-01-10 18:53:55 +01:00
Anssi Kääriäinen 0c7633178f Fixed #24020 -- Refactored SQL compiler to use expressions
Refactored compiler SELECT, GROUP BY and ORDER BY generation.
While there, also refactored select_related() implementation
(get_cached_row() and get_klass_info() are now gone!).

Made get_db_converters() method work on expressions instead of
internal_type. This allows the backend converters to target
specific expressions if need be.

Added query.context, this can be used to set per-query state.

Also changed the signature of database converters. They now accept
context as an argument.
2015-01-08 14:07:54 -05:00
Daniel Pyrathon fb48eb0581 Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Andriy Sokolovskiy 839f431ef5 Fixed #24064 -- Prevented database access at compile time in spatialite models. 2015-01-02 12:04:57 -05:00
Daniel Pyrathon 8958170755 Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions 2015-01-02 10:46:04 -05:00
Claude Paroz 51890ce889 Applied ignore_warnings to Django tests 2014-12-30 18:16:25 +01:00
Aymeric Augustin fdbfc98003 Deprecated some arguments of django.shortcuts.render(_to_response).
dictionary and context_instance and superseded by context.

Refactored tests that relied context_instance with more modern idioms.
2014-12-28 17:02:29 +01:00
Claude Paroz 234a2e0b6b Fixed #23866 -- Harmonized refs to Django documentation from code 2014-12-25 13:53:13 +01:00
Claude Paroz 6e08bde8c4 Added RasterSource/GDALBand GDAL objects
Based on Daniel Wiesmann's raster branch. Thanks Daniel Wiesmann
and Tim Graham for the reviews. Refs #23804.
2014-12-23 16:36:18 +01:00
Claude Paroz 9c1f501d7b Fixed #24014 -- Unified OGRException and GDALException
Thanks Tim Graham for the review.
2014-12-18 11:28:17 +01:00
Tim Graham f3eed95175 Removed netCDF from GIS driver testing; refs #23804.
It may not be installed on all systems.
2014-12-17 09:30:59 -05:00
Michael Hall 895dc880eb Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range 2014-12-13 12:45:58 -05:00
Claude Paroz a5499b0916 Removed empty gis models.py
Refs #22645.
2014-12-13 16:23:49 +01:00
Claude Paroz df30ae07fc Fixed postgis test database initialization
Refs #20968. Allow querying template_postgis presence without
existing test database.
Thanks Tim Graham for the review.
2014-12-12 20:08:07 +01:00
Claude Paroz bac7664f27 Ran 'CREATE EXTENSION postgis' during prepare_database hook
DatabaseWrapper.prepare_database has been introduced in 307de67073.
2014-12-08 22:22:53 +01:00
Claude Paroz 8f97413fae Fixed #20968 -- Checked Spatialite metadata before migrations
Thanks Kenial S. Lee for the initial patch and Tim Graham for
the review.
2014-12-08 22:22:53 +01:00
Jon Dufresne 4468c08d70 Fixed #23968 -- Replaced list comprehension with generators and dict comprehension 2014-12-08 07:58:23 -05:00
Berker Peksag 560b4207b1 Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Claude Paroz 00fa1474d7 Added raster support for GDAL Driver class
Based on Daniel Wiesmann's work. Refs #23804.
2014-12-02 19:56:50 +01:00
Daniel Wiesmann ac51496ceb Added cpl error codes to errcheck functions
GDAL raster methods return different error codes from the vector
API.
2014-12-02 19:56:50 +01:00
Daniel Wiesmann 4df3a3e0e9 Added GDAL prototypes for raster support
Refs #23804.
2014-12-02 19:56:35 +01:00
wrwrwr 9136ceb6fb Replaced router.routers usage with override_settings(DATABASE_ROUTERS); refs #23933. 2014-12-01 11:34:15 -05:00
Anssi Kääriäinen cbb5cdd155 Fixed #23867 -- removed DateQuerySet hacks
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
2014-11-26 17:49:25 -05:00
Carl Meyer d2bcb05980 Fixed #23873 -- Improved GIS error message when GEOS is not installed.
Thanks Claude for writing the patch.
2014-11-19 19:23:13 -07:00
Carl Meyer 4932a7b8e0 Fixed GIS tests to again skip without error when GEOS is not installed. 2014-11-19 14:29:05 -07:00
Aymeric Augustin 45db7f7db8 Replaced caching of a property with @cached_property. 2014-11-19 21:53:24 +01:00
Carl Meyer 0eba8bd8f6 Fixed GeoSQLCompiler to pass itself correctly to column as_sql. 2014-11-19 08:33:38 -07:00
Carl Meyer 84d88f5cbe Removed a deprecated use of SQLCompiler as quote_name in GIS. 2014-11-19 08:03:48 -07:00
Claude Paroz fc36437434 Added assertion error message for test_make_line
Refs #23842. Thanks Thomas Chaumeny for the suggestion.
2014-11-17 14:17:08 +01:00
Josh Smeaton f61256da3a Renamed qn to compiler 2014-11-16 13:19:34 +01:00