[PATCH 7/7] REST: Use DRF-specific filterset

Daniel Axtens dja at axtens.net
Wed May 9 01:56:18 AEST 2018


Stephen Finucane <stephen at that.guru> writes:

> Better error handling, yo.

I don't know the difference between the django_filters.FilterSet and the
django_filters.rest_framework.FilterSet

If it's error handling, does this need to be earlier in the patch
series? Your patch 3/7 for example does some error handling I don't
recognise, so I just wanted to check for the sake of bisectability and
good software practice...

Regards,
Daniel
>
> Signed-off-by: Stephen Finucane <stephen at that.guru>
> ---
>  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 4d8d504d..f6fff792 100644
> --- a/patchwork/api/filters.py
> +++ b/patchwork/api/filters.py
> @@ -20,7 +20,7 @@
>  from django.contrib.auth.models import User
>  from django.core.exceptions import ValidationError
>  from django.db.models import Q
> -from django_filters import FilterSet
> +from django_filters.rest_framework import FilterSet
>  from django_filters import IsoDateTimeFilter
>  from django_filters import ModelMultipleChoiceFilter
>  from django.forms import ModelMultipleChoiceField as BaseMultipleChoiceField
> -- 
> 2.14.3
>
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork


More information about the Patchwork mailing list