alternativeNames, bounds

This commit is contained in:
j 2011-05-29 22:35:49 +02:00
commit 2b4c70056d
2 changed files with 19 additions and 13 deletions

View file

@ -40,6 +40,16 @@ def parseCondition(condition, user):
return q
if isinstance(v, bool): #featured and public flag
key = k
elif key in ('lat', 'lng', 'area', 'south', 'west', 'north', 'east', 'matches'):
if op == '>':
key = '%s__gt'%k
elif op == '>=':
key = '%s__gte'%k
elif op == '<':
key = '%s__lt'%k
elif op == '<=':
key = '%s__lte'%k
#default is exact match
else:
if op == '=':
key = '%s__iexact'%k