Add the 'is any' verb to default list for most grid filters
This commit is contained in:
parent
12e8b662a8
commit
e13a58e808
|
@ -159,7 +159,7 @@ class GridFilter(object):
|
||||||
if callable(verbs):
|
if callable(verbs):
|
||||||
return verbs()
|
return verbs()
|
||||||
return verbs
|
return verbs
|
||||||
return ['equal', 'not_equal', 'is_null', 'is_not_null']
|
return ['equal', 'not_equal', 'is_null', 'is_not_null', 'is_any']
|
||||||
|
|
||||||
def set_value_renderer(self, renderer):
|
def set_value_renderer(self, renderer):
|
||||||
"""
|
"""
|
||||||
|
@ -289,7 +289,7 @@ class AlchemyStringFilter(AlchemyGridFilter):
|
||||||
Expose contains / does-not-contain verbs in addition to core.
|
Expose contains / does-not-contain verbs in addition to core.
|
||||||
"""
|
"""
|
||||||
return ['contains', 'does_not_contain',
|
return ['contains', 'does_not_contain',
|
||||||
'equal', 'not_equal', 'is_null', 'is_not_null']
|
'equal', 'not_equal', 'is_null', 'is_not_null', 'is_any']
|
||||||
|
|
||||||
def filter_contains(self, query, value):
|
def filter_contains(self, query, value):
|
||||||
"""
|
"""
|
||||||
|
@ -366,6 +366,7 @@ class AlchemyDateFilter(AlchemyGridFilter):
|
||||||
'less_equal': "on or before",
|
'less_equal': "on or before",
|
||||||
'is_null': "is null",
|
'is_null': "is null",
|
||||||
'is_not_null': "is not null",
|
'is_not_null': "is not null",
|
||||||
|
'is_any': "is any",
|
||||||
}
|
}
|
||||||
|
|
||||||
def default_verbs(self):
|
def default_verbs(self):
|
||||||
|
@ -373,7 +374,7 @@ class AlchemyDateFilter(AlchemyGridFilter):
|
||||||
Expose greater-than / less-than verbs in addition to core.
|
Expose greater-than / less-than verbs in addition to core.
|
||||||
"""
|
"""
|
||||||
return ['equal', 'not_equal', 'greater_than', 'greater_equal',
|
return ['equal', 'not_equal', 'greater_than', 'greater_equal',
|
||||||
'less_than', 'less_equal', 'is_null', 'is_not_null']
|
'less_than', 'less_equal', 'is_null', 'is_not_null', 'is_any']
|
||||||
|
|
||||||
def make_date(self, value):
|
def make_date(self, value):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue