Got within_box working for Geo fields

This commit is contained in:
Harry Marr
2010-07-07 15:00:46 +01:00
parent 1c334141ee
commit 71689fcf23
3 changed files with 22 additions and 0 deletions

View File

@@ -351,6 +351,8 @@ class QuerySet(object):
value = {'$within': {'$center': value}}
elif op == "near":
value = {'$near': value}
elif op == 'within_box':
value = {'$within': {'$box': value}}
else:
raise NotImplementedError("Geo method '%s' has not "
"been implemented" % op)