more user backend

This commit is contained in:
j 2011-10-03 18:09:11 +02:00
commit 26e9bb90a2
5 changed files with 72 additions and 14 deletions

View file

@ -20,12 +20,13 @@ def parseCondition(condition, user):
'''
k = condition.get('key', 'name')
k = {
'user': 'annotations__user__username',
'place': 'annotations__places__id',
'event': 'annotations__events__id',
'id': 'public_id',
'in': 'start',
'out': 'end',
'id': 'public_id',
'place': 'annotations__places__id',
'text': 'annotations__value',
'user': 'annotations__user__username',
}.get(k, k)
if not k:
k = 'name'