summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-10-06 22:05:53 +0200
committerClaude Paroz <claude@2xlibre.net>2015-10-09 15:27:47 +0200
commit37d06cfc46679759c47178a3380b12fbf22a4f25 (patch)
treeea1c002d8bc9888c32a2a18e80ba8bcbe44f8970 /docs
parent4a7b58210defea33a428b748ccbc97ae8fd49838 (diff)
Fixed #25499 -- Added the ability to pass an expression in distance lookups
Thanks Bibhas Debnath for the report and Tim Graham for the review.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/gis/geoquerysets.txt12
-rw-r--r--docs/releases/1.10.txt3
2 files changed, 11 insertions, 4 deletions
diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt
index 9a42bd7a15..8b554ece06 100644
--- a/docs/ref/contrib/gis/geoquerysets.txt
+++ b/docs/ref/contrib/gis/geoquerysets.txt
@@ -515,14 +515,20 @@ Distance lookups take the following form::
The value passed into a distance lookup is a tuple; the first two
values are mandatory, and are the geometry to calculate distances to,
-and a distance value (either a number in units of the field or a
-:class:`~django.contrib.gis.measure.Distance` object). On every
-distance lookup but :lookup:`dwithin`, an optional
+and a distance value (either a number in units of the field, a
+:class:`~django.contrib.gis.measure.Distance` object, or a `query expression
+<ref/models/expressions>`).
+
+With PostGIS, on every distance lookup but :lookup:`dwithin`, an optional
third element, ``'spheroid'``, may be included to tell GeoDjango
to use the more accurate spheroid distance calculation functions on
fields with a geodetic coordinate system (e.g., ``ST_Distance_Spheroid``
would be used instead of ``ST_Distance_Sphere``).
+.. versionadded:: 1.10
+
+ The ability to pass an expression as the distance value was added.
+
.. fieldlookup:: distance_gt
distance_gt
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index bb911bb8a0..c9978ac345 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -59,7 +59,8 @@ Minor features
:mod:`django.contrib.gis`
^^^^^^^^^^^^^^^^^^^^^^^^^^
-* ...
+* :ref:`Distance lookups <distance-lookups>` now accept expressions as the
+ distance value parameter.
:mod:`django.contrib.messages`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^