+ __not_like db condition

This commit is contained in:
Lex Berezhny 2019-03-25 22:04:48 -04:00
parent 33ac9eea13
commit d7dadc2f0e

View file

@ -101,6 +101,8 @@ def constraints_to_sql(constraints, joiner=' AND ', prepend_key=''):
col, op = col[:-len('__gt')], '>' col, op = col[:-len('__gt')], '>'
elif key.endswith('__like'): elif key.endswith('__like'):
col, op = col[:-len('__like')], 'LIKE' col, op = col[:-len('__like')], 'LIKE'
elif key.endswith('__not_like'):
col, op = col[:-len('__not_like')], 'NOT LIKE'
elif key.endswith('__in') or key.endswith('__not_in'): elif key.endswith('__in') or key.endswith('__not_in'):
if key.endswith('__in'): if key.endswith('__in'):
col, op = col[:-len('__in')], 'IN' col, op = col[:-len('__in')], 'IN'