It would appear that object-based mixins don't work with django-filter's FilterSet. This should probably be fixed upstream, but for now let's live with the extra duplication.
Signed-off-by: Stephen Finucane <[email protected]> Fixes: 0fc32337 ("REST: Integrate django-filter support") Cc: Andy Doan <[email protected]> --- I've reported this upstream [1] but we want this to work now. [1] https://github.com/carltongibson/django-filter/issues/618 --- patchwork/api/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py index f475ca8..ecef304 100644 --- a/patchwork/api/filters.py +++ b/patchwork/api/filters.py @@ -26,7 +26,7 @@ from patchwork.models import Patch from patchwork.models import Series -class TimestampMixin(object): +class TimestampMixin(FilterSet): # TODO(stephenfin): These should filter on a 'updated_at' field instead before = IsoDateTimeFilter(name='date', lookup_expr='lt') -- 2.9.3 _______________________________________________ Patchwork mailing list [email protected] https://lists.ozlabs.org/listinfo/patchwork
