in between queries
default view/sort for lists
This commit is contained in:
parent
d6e27be0cd
commit
0eefc3dfd3
3 changed files with 47 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue