Added tests, documentation and simplified code

This commit is contained in:
Matthieu Rigal
2015-06-21 03:03:50 +02:00
parent 2d57dc0565
commit 5efabdcea3
5 changed files with 70 additions and 32 deletions

View File

@@ -29,6 +29,7 @@ Changes in 0.9.X - DEV
- Added `BaseQuerySet.aggregate_sum` and `BaseQuerySet.aggregate_average` methods.
- Fix for delete with write_concern {'w': 0}. #1008
- Allow dynamic lookup for more than two parts. #882
- Added support for min_distance on geo queries. #831
Changes in 0.9.0
================

View File

@@ -146,9 +146,10 @@ The following were added in MongoEngine 0.8 for
loc.objects(point__near=[40, 5])
loc.objects(point__near={"type": "Point", "coordinates": [40, 5]})
You can also set the maximum distance in meters as well::
You can also set the maximum and/or the minimum distance in meters as well::
loc.objects(point__near=[40, 5], point__max_distance=1000)
loc.objects(point__near=[40, 5], point__min_distance=100)
The older 2D indexes are still supported with the
:class:`~mongoengine.fields.GeoPointField`:
@@ -168,7 +169,8 @@ The older 2D indexes are still supported with the
* ``max_distance`` -- can be added to your location queries to set a maximum
distance.
* ``min_distance`` -- can be added to your location queries to set a minimum
distance.
Querying lists
--------------