Merge branch 'master' of github.com:MongoEngine/mongoengine
This commit is contained in:
commit
a839bd428f
@ -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
|
* ``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::
|
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_within=[[[40, 5], [40, 6], [41, 6], [40, 5]]])
|
||||||
loc.objects(point__geo_with={"type": "Polygon",
|
loc.objects(point__geo_within={"type": "Polygon",
|
||||||
"coordinates": [[[40, 5], [40, 6], [41, 6], [40, 5]]]})
|
"coordinates": [[[40, 5], [40, 6], [41, 6], [40, 5]]]})
|
||||||
|
|
||||||
* ``geo_within_box`` - simplified geo_within searching with a box eg::
|
* ``geo_within_box`` - simplified geo_within searching with a box eg::
|
||||||
|
@ -270,7 +270,7 @@ queryset you should upgrade to use count::
|
|||||||
len(Animal.objects(type="mammal"))
|
len(Animal.objects(type="mammal"))
|
||||||
|
|
||||||
# New code
|
# New code
|
||||||
Animal.objects(type="mammal").count())
|
Animal.objects(type="mammal").count()
|
||||||
|
|
||||||
|
|
||||||
.only() now inline with .exclude()
|
.only() now inline with .exclude()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user