Refactored GIS-related JavaScript initialization to eliminate inline
scripts from templates. Added support for specifying a base layer using
the new `base_layer_name` attribute on `BaseGeometryWidget`, allowing
custom map tile providers via user-defined JavaScript.
As a result, the `gis/openlayers-osm.html` template was removed.
Thanks Sarah Boyce for reviews.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Swapped to an allow list instead of a deny list for field types to
determine if the UNNEST optimization can be enabled to avoid further
surprises with other types that would require further specialization to
adapt.
Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.
Thanks Joshua Goodwin for the report and Sarah Boyce for the test.
Replaced manual caching complexity with cached_property for efficiency.
Enhanced error handling with distinct messages for WKT and PROJ.4.
Thanks to Sarah Boyce for the suggestions.
Updated test for change to exportToXML() which now errors out on unsupported projection methods. See https://github.com/OSGeo/gdal/issues/9223.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Thanks Felix Farquharson for the report and Claude Paroz for the
review.
Regression in 40b5b1596f7505416bd30d5d7582b5a9004ea7d5.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
These changes will make it easier to introduce tests for alternate
databases that may have different results without the need to duplicate
lots of the tests definition.
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.
This avoids passing "blank=False" and "srid=4326" to field classes,
which are the default values, and removes special treatment for the
"blank" parameter.
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.
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>