Add the 'is any' verb to default list for most grid filters

This commit is contained in:
Lance Edgar 2016-03-24 00:05:04 -05:00
parent 12e8b662a8
commit e13a58e808

View file

@ -159,7 +159,7 @@ class GridFilter(object):
if callable(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):
"""
@ -289,7 +289,7 @@ class AlchemyStringFilter(AlchemyGridFilter):
Expose contains / does-not-contain verbs in addition to core.
"""
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):
"""
@ -366,6 +366,7 @@ class AlchemyDateFilter(AlchemyGridFilter):
'less_equal': "on or before",
'is_null': "is null",
'is_not_null': "is not null",
'is_any': "is any",
}
def default_verbs(self):
@ -373,7 +374,7 @@ class AlchemyDateFilter(AlchemyGridFilter):
Expose greater-than / less-than verbs in addition to core.
"""
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):
"""