in between queries

default view/sort for lists
This commit is contained in:
rolux 2011-09-29 17:13:07 +00:00
commit 0eefc3dfd3
3 changed files with 47 additions and 25 deletions

View file

@ -67,6 +67,10 @@ def parseCondition(condition):
in_find = False
facet_value = 'facets__value%s' % {
'==': '__iexact',
'>': '__gt',
'>=': '__gte',
'<': '__lt',
'<=': '__lte',
'^': '__istartswith',
'$': '__iendswith',
}.get(op, '__icontains')
@ -75,6 +79,10 @@ def parseCondition(condition):
else:
value_key = 'find__value%s' % {
'==': '__iexact',
'>': '__gt',
'>=': '__gte',
'<': '__lt',
'<=': '__lte',
'^': '__istartswith',
'$': '__iendswith',
}.get(op, '__icontains')
@ -131,7 +139,7 @@ def parseCondition(condition):
}.get(op,'__exact'))
vk = str('find__%s' % vk)
if exclude: #!1960
return ~Q(**{'find__key': k, vk: v})
else: #1960