1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
Commit Graph

517 Commits

Author SHA1 Message Date
Mariusz Felisiak
f8cc9285e1 Fixed #35074 -- Fixed adding/removing indexes when spatial_index is changed on MySQL, PostgreSQL, and Oracle.
Co-authored-by: Mário Falcão <mario@falcao.dev>
2024-09-19 08:12:11 +02:00
Simon Charette
57307bbc7d Fixed #35666 -- Documented stacklevel usage and testing, and adjusted test suite accordingly.
Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.

This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.
2024-08-28 11:44:05 -03:00
Mariusz Felisiak
20c2d625d3 Refs #35074 -- Avoided failed attempts to remove spatial indexes on nullable fields on MySQL.
MySQL doesn't support spatial indexes on NULL columns, so there is no
point in removing them.
2024-06-20 11:44:44 +02:00
Mariusz Felisiak
a0c44d4e23 Simplified OperationTestCase.alter_gis_model() test hook a bit.
This avoids passing "blank=False" and "srid=4326" to field classes,
which are the default values, and removes special treatment for the
"blank" parameter.
2024-06-18 12:03:57 +02:00
Claude Paroz
10b31eea33 Refs #31014 -- Added srid argument to FromWKB/FromWKT() GIS functions. 2024-03-18 09:45:33 +01:00
Claude Paroz
894fa55da1
Applied BoundingCircle test to only one country.
Looks like testing the second Country is much more computing-intensive
and brings nothing to the test.
2024-03-10 20:59:36 +01:00
cuinix
20848bcf39 Fixed typos in docstrings and docs.
Signed-off-by: cuinix <915115094@qq.com>
2024-03-07 06:01:01 +01:00
Simon Charette
daf7d482db Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.
Once the deprecation period ends CheckConstraint.check() can become the
documented method that performs system checks for BaseConstraint
subclasses.
2024-03-01 07:15:32 +01:00
David Smith
222bf2932b Refs #35058 -- Added support for measured geometries to GDAL GeometryCollection and subclasses. 2024-02-12 15:21:11 +01:00
David Smith
d3922e9e5a
Refs #35058 -- Added support for measured geometries to GDAL Polygon. 2024-01-31 13:11:16 +01:00
David Smith
1df8983aa3 Refs #35058 -- Added support for measured geometries to GDAL LineString. 2024-01-29 08:44:42 +01:00
David Smith
2005530920 Refs #35058 -- Made centroid available on all geometry types.
Centroid is available on all geometry types since GDAL 1.8.0.
Previously it was restricted to Polygon.

https://gdal.org/doxygen/classOGRGeometry.html#a91787f669b2a148169667e270e7e40df
2024-01-28 14:40:19 +01:00
Mariusz Felisiak
305757aec1
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
David Smith
3f6d939c62 Refs #35058 -- Added support for measured geometries to GDAL Point.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2024-01-25 08:59:16 +01:00
David Smith
f4c5973464 Refs #35058 -- Deprecated OGRGeometry.coord_dim setter.
Reflecting a change in the underlying GDAL library (since GDAL 2.1)
using coord_dim to set a geometries dimensions is deprecated in favor
of set_3d().
2024-01-23 05:37:59 +01:00
David Smith
1c3a9b9f96 Added more WKT and WKB tests. 2024-01-22 10:40:32 +01:00
David Smith
cfacd69ab8 Refs #35058 -- Added is_3d and set_3d() to OGRGeometry. 2024-01-18 10:48:40 +01:00
Alexis Athlani
c7e986fc9f Fixed #35117 -- Added support for the hectare unit in Area. 2024-01-16 20:31:46 +01:00
Nick Pope
40b5b1596f Fixed #35100 -- Reworked GeoIP2 database initialization. 2024-01-11 12:01:35 +01:00
Nick Pope
f50184a84b
Fixed #35092 -- Exposed extra fields for GeoIP2.country() and GeoIP2.city() responses. 2024-01-10 12:09:44 +01:00
Nick Pope
cc56c22a24
Fixed #35091 -- Allowed GeoIP2 querying using IPv4Address/IPv6Address. 2024-01-07 08:15:40 +01:00
David Smith
45f59d0eab Fixed #35086 -- Added support for BoundedCircle on Spatialite 5.1+.
Spatialite 5.1 added support for BoundingCircle
(GEOSMinimumBoundingCircle). GEOS 3.7 is required which is lower than
Django's currently supported minmum of 3.8.

https://groups.google.com/g/spatialite-users/c/hAJ2SgitN4M

https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html
2024-01-05 11:55:44 +01:00
Mariusz Felisiak
d88ec42bd0
Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
David Smith
21b0b23a67 Refs #35058 -- Made OGRGeomType aware of additional WKB geometry types.
This commit increases OGRGeomType's knowledge of WKB types and allows
for improved error messages when Django doesn't yet have a corresponding
class to wrap a given type.
2023-12-27 11:40:28 +01:00
David Smith
2a2481f5a2
Refs #35058 -- Added __repr__() to OGRGeomType. 2023-12-26 21:23:33 +01:00
David Smith
c709a748ce Fixed #35049 -- Dropped support for GDAL 2.4. 2023-12-20 21:44:11 +01:00
Claude Paroz
08306bad57 Fixed #34411 -- Updated GDAL API to handle vector DataSource's.
Co-authored-by: David Smith <smithdc@gmail.com>
2023-12-18 09:42:04 +01:00
Nick Pope
a93375e8ab Fixed #34305 -- Changed GeoIP2 tests to use MaxMind test databases.
GEOIP_SETTINGS is removed from the global scope as this prevents
modifications to the settings using @override_settings in tests.

Additional improvements now that we have stable test databases include:

- Made testing more comprehensive and improved coverage
- Patched socket.gethostbyname() for whole test case
- Added testing of non-free GeoIP2 databases

Co-authored-by: Tom Forbes <tom@tomforb.es>
2023-12-12 09:58:26 +01:00
Nick Pope
07f9f9960c Deprecated django.contrib.gis.geoip2.GeoIP2.open(). 2023-12-05 08:21:19 +01:00
Nick Pope
0f83133a35
Made GeoIP2.__del__() close all databases. 2023-12-01 13:55:45 +01:00
Nick Pope
b925fefd7d Deprecated django.contrib.gis.geoip2.GeoIP2.coords().
The `ordering` argument is undocumented and of limited use, so this is
effectively the same as `GeoIP2.lon_lat()`.
2023-12-01 08:38:42 +01:00
Mariusz Felisiak
6e369f36f2
Refs #34882 -- Fixed GISFunctionsTests.test_asgeojson_option_0() test on Oracle.
This uses an example with the same precision for all databases.

Follow up to 96e7a752b6.
2023-10-11 10:58:10 +02:00
Denis Rouzaud
96e7a752b6
Fixed #34882 -- Fixed no options in AsGeoJSON() for geometries in non-default CRS. 2023-10-06 05:25:32 +02:00
pieterck
0989cf13e7 Fixed #34759 -- Confirmed support for SpatiaLite 5.1.
Thanks The Epic Dev for helping with tests.
2023-10-04 19:58:27 +02:00
Mariusz Felisiak
2c6ebb65c9
Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5. 2023-09-20 13:45:51 +02:00
Mariusz Felisiak
7433237664 Refs #33924 -- Removed BaseGeometryWidget.map_height/map_width attributes per deprecation timeline. 2023-09-18 22:12:40 +02:00
konsti
48a1929ca0
Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
Olivier Tabone
0f3b1a783d Fixed #34739 -- Added GEOSGeometry.equals_identical() method. 2023-08-05 18:23:38 +02:00
Olivier Tabone
f46a6b2816 Fixed #34686 -- Added support for GEOS 3.12. 2023-08-04 05:53:29 +02:00
Gregor Jerše
10725a3187 Fixed #32820 -- Added aria-invalid="true" to fields with errors.
Co-authored-by: Demetris Stavrou <demestav@gmail.com>
Co-authored-by: David Smith <smithdc@gmail.com>
2023-08-01 06:08:04 +02:00
Mariusz Felisiak
f64fd47a76
Fixed #9602 -- Added AdminSite.get_model_admin().
This allows retrieving an admin class for the given model class without
using internal attributes.
2023-07-07 08:06:01 +02:00
Mariusz Felisiak
7eeadc82c2
Fixed RelatedGeoModelTest.test_centroid_collect_filter(). 2023-06-30 10:18:04 +02:00
Mariusz Felisiak
953f29f700
Fixed #34572 -- Added support for GDAL 3.7.
Co-authored-by: Michael Howitz <mh@gocept.com>
2023-06-30 06:03:08 +02:00
Mariusz Felisiak
601ffb0da3
Fixed #34685 -- Dropped support for GEOS 3.6 and 3.7. 2023-06-29 21:45:36 +02:00
Mariusz Felisiak
6a523500af
Fixed #34684 -- Dropped support for GDAL 2.2 and 2.3. 2023-06-29 09:11:30 +02:00
Andrew Northall
38cde27a89 Fixed #34676 -- Normalized Distance()/Area() exceptions for nonexistent units. 2023-06-25 13:09:30 +02:00
Olivier Le Thanh Duong
1b754d638d Fixed #34629 -- Added filtering support to GIS aggregates. 2023-06-16 12:20:13 +02:00
Heath Henley
56e5ea805b
Fixed #34374 -- Fixed GIS tests on Windows. 2023-03-02 19:14:24 +01:00
Mariusz Felisiak
5afd8c6940
Refs #16969 -- Added test for not initializing PostGIS-specific stuff for non-db connections. 2023-02-21 08:42:28 +01:00
Stefan Brand
eacf6b73d8 Fixed #34302 -- Fixed SpatialReference.srid for objects without top-level authority. 2023-02-17 19:56:29 +01:00