I want to create a slightly more complex filter_by - such that if I pass some kwargs and values, and some are None, then those aren't included in the filter. I'm not sure how to override filter_by globally.
Effectively what I'm looking for is:
data = {'is_enabled': True, 'city': 'SF', 'address': None}
query.smart_filter(data)
and smart_filter excludes the 'address' field and calls filter_by with 'is_enabled' and 'city' values.
Is there any way I could build something like this?