From 7914cd47ca732edf53e5473d5c0f3c532d5c1eaf Mon Sep 17 00:00:00 2001 From: David Wilemski Date: Fri, 17 Jan 2014 20:36:02 -0500 Subject: [PATCH 1/2] Fix typo in upgrade docs Removed extra closing parenthesis --- docs/upgrade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrade.rst b/docs/upgrade.rst index a1fccea2..fadda7c6 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -270,7 +270,7 @@ queryset you should upgrade to use count:: len(Animal.objects(type="mammal")) # New code - Animal.objects(type="mammal").count()) + Animal.objects(type="mammal").count() .only() now inline with .exclude() From 63ebb6998e8eaa258e518372d79a28fabcc30153 Mon Sep 17 00:00:00 2001 From: Yuri Prezument Date: Wed, 22 Jan 2014 22:47:48 +0200 Subject: [PATCH 2/2] geo_within docs - fix broken code samples No such thing as "geo_with" --- docs/guide/querying.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/querying.rst b/docs/guide/querying.rst index f50985b5..32cbb94e 100644 --- a/docs/guide/querying.rst +++ b/docs/guide/querying.rst @@ -92,8 +92,8 @@ were added in 0.8 for: :class:`~mongoengine.fields.PointField`, * ``geo_within`` -- Check if a geometry is within a polygon. For ease of use it accepts either a geojson geometry or just the polygon coordinates eg:: - loc.objects(point__geo_with=[[[40, 5], [40, 6], [41, 6], [40, 5]]]) - loc.objects(point__geo_with={"type": "Polygon", + loc.objects(point__geo_within=[[[40, 5], [40, 6], [41, 6], [40, 5]]]) + loc.objects(point__geo_within={"type": "Polygon", "coordinates": [[[40, 5], [40, 6], [41, 6], [40, 5]]]}) * ``geo_within_box`` - simplified geo_within searching with a box eg::