summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-07-12 21:23:25 -0400
committerGitHub <noreply@github.com>2017-07-12 21:23:25 -0400
commite532bf7a901a3bf8140a3359ba2ba40c69e9f539 (patch)
tree8169b01722d877530a9b03e844db56438972938e
parent815a0bb80de7bdbabe0d865e8f37fa7e9b64c095 (diff)
Removed GeometryField.get_distance(); a GeoQuerySet leftover.
Follow up to a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
-rw-r--r--django/contrib/gis/db/models/fields.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/django/contrib/gis/db/models/fields.py b/django/contrib/gis/db/models/fields.py
index b98c576c83..157deaee88 100644
--- a/django/contrib/gis/db/models/fields.py
+++ b/django/contrib/gis/db/models/fields.py
@@ -280,15 +280,6 @@ class GeometryField(GeoSelectFormatMixin, BaseSpatialField):
kwargs['geography'] = self.geography
return name, path, args, kwargs
- # ### Routines specific to GeometryField ###
- def get_distance(self, value, lookup_type, connection):
- """
- Return a distance number in units of the field. For example, if
- `D(km=1)` was passed in and the units of the field were in meters,
- then 1000 would be returned.
- """
- return connection.ops.get_distance(self, value, lookup_type)
-
def get_db_prep_value(self, value, connection, *args, **kwargs):
return connection.ops.Adapter(
super().get_db_prep_value(value, connection, *args, **kwargs),
@@ -304,7 +295,6 @@ class GeometryField(GeoSelectFormatMixin, BaseSpatialField):
value.srid = self.srid
return value
- # ### Routines overloaded from Field ###
def contribute_to_class(self, cls, name, **kwargs):
super().contribute_to_class(cls, name, **kwargs)