add & operator to find many ids
This commit is contained in:
parent
4ec7e1b6c1
commit
3465d3ee9f
4 changed files with 22 additions and 15 deletions
|
|
@ -10,6 +10,7 @@ def get_operator(op, type='str'):
|
|||
'<=': '__lte',
|
||||
'^': '__startswith',
|
||||
'$': '__endswith',
|
||||
'&': '__in',
|
||||
},
|
||||
'istr': {
|
||||
'==': '__iexact',
|
||||
|
|
@ -20,6 +21,7 @@ def get_operator(op, type='str'):
|
|||
'<=': '__lte',
|
||||
'^': '__istartswith',
|
||||
'$': '__iendswith',
|
||||
'&': '__in',
|
||||
},
|
||||
'int': {
|
||||
'==': '',
|
||||
|
|
@ -27,6 +29,7 @@ def get_operator(op, type='str'):
|
|||
'>=': '__gte',
|
||||
'<': '__lt',
|
||||
'<=': '__lte',
|
||||
'&': '__in',
|
||||
}
|
||||
}[type].get(op, {
|
||||
'str': '__contains',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue