Commit 4198ea8a authored by ynerant's avatar ynerant

Use icontains rather than iregex in search field

parent 7ed6b971
Pipeline #4120 passed with stages
in 5 minutes and 3 seconds
......@@ -107,7 +107,7 @@ class BDViewSet(viewsets.ModelViewSet):
serializer_class = BDSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["isbn", "side_identifier"]
search_fields = ["isbn", "$title", "$subtitle", "side_identifier", "$authors__name"]
search_fields = ["=isbn", "title", "subtitle", "side_identifier", "authors__name"]
class MangaViewSet(viewsets.ModelViewSet):
......@@ -118,7 +118,7 @@ class MangaViewSet(viewsets.ModelViewSet):
serializer_class = MangaSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["isbn", "side_identifier"]
search_fields = ["isbn", "$title", "$subtitle", "side_identifier", "$authors__name"]
search_fields = ["=isbn", "title", "subtitle", "side_identifier", "authors__name"]
class CDViewSet(viewsets.ModelViewSet):
......@@ -129,7 +129,7 @@ class CDViewSet(viewsets.ModelViewSet):
serializer_class = CDSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["side_identifier"]
search_fields = ["$title", "side_identifier", "$authors__name"]
search_fields = ["title", "side_identifier", "authors__name"]
class VinyleViewSet(viewsets.ModelViewSet):
......@@ -140,7 +140,7 @@ class VinyleViewSet(viewsets.ModelViewSet):
serializer_class = VinyleSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["side_identifier", "rpm"]
search_fields = ["$title", "side_identifier", "$authors__name"]
search_fields = ["title", "side_identifier", "authors__name"]
class RomanViewSet(viewsets.ModelViewSet):
......@@ -151,7 +151,7 @@ class RomanViewSet(viewsets.ModelViewSet):
serializer_class = RomanSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["isbn", "side_identifier", "number_of_pages"]
search_fields = ["$title", "$subtitle", "side_identifier", "$authors__name"]
search_fields = ["=isbn", "title", "subtitle", "side_identifier", "authors__name"]
class RevueViewSet(viewsets.ModelViewSet):
......@@ -162,7 +162,7 @@ class RevueViewSet(viewsets.ModelViewSet):
serializer_class = RevueSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["number", "year", "month", "day", "double"]
search_fields = ["$title"]
search_fields = ["title"]
class FutureMediaViewSet(viewsets.ModelViewSet):
......@@ -173,7 +173,7 @@ class FutureMediaViewSet(viewsets.ModelViewSet):
serializer_class = FutureMediaSerializer
filter_backends = [DjangoFilterBackend, SearchFilter]
filterset_fields = ["isbn"]
search_fields = ["$isbn"]
search_fields = ["=isbn"]
class EmpruntViewSet(viewsets.ModelViewSet):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment