Removed GeometryField.get_distance(); a GeoQuerySet leftover.
Follow up to a0d166306f
.
This commit is contained in:
parent
815a0bb80d
commit
e532bf7a90
|
@ -280,15 +280,6 @@ class GeometryField(GeoSelectFormatMixin, BaseSpatialField):
|
||||||
kwargs['geography'] = self.geography
|
kwargs['geography'] = self.geography
|
||||||
return name, path, args, kwargs
|
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):
|
def get_db_prep_value(self, value, connection, *args, **kwargs):
|
||||||
return connection.ops.Adapter(
|
return connection.ops.Adapter(
|
||||||
super().get_db_prep_value(value, connection, *args, **kwargs),
|
super().get_db_prep_value(value, connection, *args, **kwargs),
|
||||||
|
@ -304,7 +295,6 @@ class GeometryField(GeoSelectFormatMixin, BaseSpatialField):
|
||||||
value.srid = self.srid
|
value.srid = self.srid
|
||||||
return value
|
return value
|
||||||
|
|
||||||
# ### Routines overloaded from Field ###
|
|
||||||
def contribute_to_class(self, cls, name, **kwargs):
|
def contribute_to_class(self, cls, name, **kwargs):
|
||||||
super().contribute_to_class(cls, name, **kwargs)
|
super().contribute_to_class(cls, name, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue