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()