GeoQuerySet.distance(geom, **kwargs)
Deprecated since version 1.9: Use the Distance function instead.
This method takes a geometry as a parameter, and attaches a distance attribute to every model in the returned queryset that contains the distance (as a Distance object) to the given geometry.
In the following example (taken from the GeoDjango distance tests), the distance from the Tasmanian city of Hobart to every other PointField in the AustraliaCity queryset is calculated:
>>> p