1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Deprecated legacy GeoManager/GeoQuerySet methods

This commit is contained in:
Claude Paroz
2015-01-29 20:12:08 +01:00
parent 71e20814fc
commit ea27e26b09
10 changed files with 70 additions and 9 deletions

View File

@@ -35,6 +35,8 @@ details on these changes.
* The ``django.contrib.auth.tests.utils.skipIfCustomUser()`` decorator will be
removed.
* The ``GeoManager`` and ``GeoQuerySet`` classes will be removed.
.. _deprecation-removed-in-2.0:
2.0

View File

@@ -400,6 +400,16 @@ of its methods and attributes are either changed or renamed.
The aim of these changes is to provide a documented API for relation fields.
``GeoManager`` and ``GeoQuerySet`` custom methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All custom ``GeoQuerySet`` methods (``area()``, ``distance()``, ``gml()``, ...)
have been replaced by equivalent geographic expressions in annotations (see in
new features). Hence the need to set a custom ``GeoManager`` to GIS-enabled
models is now obsolete. As soon as your code doesn't call any of the deprecated
methods, you can simply remove the ``objects = GeoManager()`` lines from your
models.
Miscellaneous
~~~~~~~~~~~~~