Skip to content

Commit

Permalink
fix deprecated filter_fields in django-filters v23
Browse files Browse the repository at this point in the history
  • Loading branch information
goapunk authored and fuzzylogic2000 committed May 16, 2023
1 parent 9e59c46 commit 658dfd7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bplan/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ class BezirkViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Bezirk.objects.all()
serializer_class = BezirkSerializer
filter_backends = (DjangoFilterBackend,)
filter_fields = ("name", "slug")
filterset_fields = ("name", "slug")


class OrtsteilViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Ortsteil.objects.all()
serializer_class = OrtsteilSerializer
filter_backends = (DjangoFilterBackend,)
filter_fields = ("name",)
filterset_fields = ("name",)


class BPlanViewSet(viewsets.ReadOnlyModelViewSet):
Expand All @@ -77,7 +77,7 @@ class BPlanViewSet(viewsets.ReadOnlyModelViewSet):
)
bbox_filter_include_overlapping = True
bbox_filter_field = "multipolygon"
filter_fields = (
filterset_fields = (
"bplanID",
"planname",
"bezirk",
Expand All @@ -92,7 +92,7 @@ class BPlanDataViewSet(viewsets.ReadOnlyModelViewSet):
serializer_class = SimpleBPlanSerializer
pagination_class = CustomPagination
filter_backends = (DjangoFilterBackend, StatusFilter, OrtsteilFilter)
filter_fields = (
filterset_fields = (
"bplanID",
"planname",
"bezirk",
Expand All @@ -116,7 +116,7 @@ class BPlanPointViewSet(viewsets.ReadOnlyModelViewSet):
)
bbox_filter_field = "point"
bbox_filter_include_overlapping = True
filter_fields = (
filterset_fields = (
"bplanID",
"planname",
"bezirk",
Expand All @@ -140,7 +140,7 @@ class BPlanMultipolygonViewSet(viewsets.ReadOnlyModelViewSet):
)
bbox_filter_include_overlapping = True
bbox_filter_field = "multipolygon"
filter_fields = (
filterset_fields = (
"bplanID",
"planname",
"bezirk",
Expand Down

0 comments on commit 658dfd7

Please sign in to comment.