Hey y'all
I'm looking for a way to have negative or excluding filters, which are possible to declare like this:
not_created__gt = rest_framework_filters.DateFilter(
field_name="created", exclude=True, lookup_expr='gt')
not_created__lt = rest_framework_filters.DateFilter(
field_name="created", exclude=True, lookup_expr='lt')
... but not on Meta. I was hoping I could do something like this:
class Meta:
fields = {
"-created": ["lt", "gt"],
}
My use case is filtering nullable date values, in which case exclude() is so very valuable.