Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecated filter_fields in django-filters v23 #602

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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