From 035835d0a266966516063ca3210decc581c3bd4e Mon Sep 17 00:00:00 2001 From: SKairinos Date: Mon, 16 Oct 2023 09:06:44 +0100 Subject: [PATCH] rename filter to filterset --- codeforlife/user/filters/__init__.py | 2 +- codeforlife/user/filters/user.py | 2 +- codeforlife/user/views/user.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codeforlife/user/filters/__init__.py b/codeforlife/user/filters/__init__.py index 2c0871af..7f31a373 100644 --- a/codeforlife/user/filters/__init__.py +++ b/codeforlife/user/filters/__init__.py @@ -1 +1 @@ -from .user import UserFilter +from .user import UserFilterSet diff --git a/codeforlife/user/filters/user.py b/codeforlife/user/filters/user.py index b088693a..424dbbe9 100644 --- a/codeforlife/user/filters/user.py +++ b/codeforlife/user/filters/user.py @@ -3,7 +3,7 @@ from ..models import User -class UserFilter(filters.FilterSet): +class UserFilterSet(filters.FilterSet): student__klass = filters.CharFilter( "new_student__class_field__access_code", "exact" ) diff --git a/codeforlife/user/views/user.py b/codeforlife/user/views/user.py index c7b5e0d6..61001cb2 100644 --- a/codeforlife/user/views/user.py +++ b/codeforlife/user/views/user.py @@ -1,6 +1,6 @@ from rest_framework.viewsets import ModelViewSet -from ..filters import UserFilter +from ..filters import UserFilterSet from ..models import User from ..serializers import UserSerializer @@ -8,7 +8,7 @@ class UserViewSet(ModelViewSet): http_method_names = ["get", "post", "patch"] serializer_class = UserSerializer - filterset_class = UserFilter + filterset_class = UserFilterSet def get_queryset(self): queryset = User.objects.all()