Ticket #21096: documentation.diff

File documentation.diff, 1008 bytes (added by Luca Marra, 11 years ago)

updated method documentation

  • docs/ref/contrib/gis/geoquerysets.txt

    diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt
    index 66afc3d..66a91f6 100644
    a b each element of this GeoQuerySet.  
    701701``distance``
    702702~~~~~~~~~~~~
    703703
    704 .. method:: GeoQuerySet.distance(geom, **kwargs)
     704.. method:: GeoQuerySet.distance(geom, att='distance', **kwargs)
    705705
    706 This method takes a geometry as a parameter, and attaches a ``distance``
     706This method takes a geometry as a parameter, and attaches an
    707707attribute to every model in the returned queryset that contains the
    708708distance (as a :class:`~django.contrib.gis.measure.Distance` object) to the given geometry.
    709709
     710``att``, wich defaults to ``'distance'``, is the name of the attached attribute.
     711
    710712In the following example (taken from the `GeoDjango distance tests`__),
    711713the distance from the `Tasmanian`__ city of Hobart to every other
    712714:class:`PointField` in the ``AustraliaCity`` queryset is calculated::
Back to Top