Skip to content

Commit

Permalink
replace filter_class with filterset_class (depreciate by django-filter)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Jul 30, 2024
1 parent 48ab991 commit 1803c13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lemarche/api/perimeters/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class PerimeterViewSet(mixins.ListModelMixin, viewsets.GenericViewSet):
queryset = Perimeter.objects.all()
serializer_class = PerimeterSimpleSerializer
filter_class = PerimeterFilter
filterset_class = PerimeterFilter

@extend_schema(summary="Lister tous les périmètres", tags=[Perimeter._meta.verbose_name_plural])
def list(self, request, *args, **kwargs):
Expand All @@ -20,7 +20,7 @@ def list(self, request, *args, **kwargs):
class PerimeterAutocompleteViewSet(mixins.ListModelMixin, viewsets.GenericViewSet):
queryset = Perimeter.objects.all()
serializer_class = PerimeterSimpleSerializer
filter_class = PerimeterAutocompleteFilter
filterset_class = PerimeterAutocompleteFilter
pagination_class = None

def finalize_response(self, request, response, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion lemarche/api/siaes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SiaeViewSet(mixins.ListModelMixin, mixins.RetrieveModelMixin, viewsets.Gen

queryset = Siae.objects.api_query_set()
serializer_class = SiaeListSerializer
filter_class = SiaeFilter
filterset_class = SiaeFilter

@extend_schema(
summary="Lister toutes les structures",
Expand Down

0 comments on commit 1803c13

Please sign in to comment.