Use icontains rather than iregex in search field
This commit is contained in:
parent
7ed6b9712b
commit
4198ea8a72
|
@ -107,7 +107,7 @@ class BDViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = BDSerializer
|
serializer_class = BDSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["isbn", "side_identifier"]
|
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):
|
class MangaViewSet(viewsets.ModelViewSet):
|
||||||
|
@ -118,7 +118,7 @@ class MangaViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = MangaSerializer
|
serializer_class = MangaSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["isbn", "side_identifier"]
|
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):
|
class CDViewSet(viewsets.ModelViewSet):
|
||||||
|
@ -129,7 +129,7 @@ class CDViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = CDSerializer
|
serializer_class = CDSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["side_identifier"]
|
filterset_fields = ["side_identifier"]
|
||||||
search_fields = ["$title", "side_identifier", "$authors__name"]
|
search_fields = ["title", "side_identifier", "authors__name"]
|
||||||
|
|
||||||
|
|
||||||
class VinyleViewSet(viewsets.ModelViewSet):
|
class VinyleViewSet(viewsets.ModelViewSet):
|
||||||
|
@ -140,7 +140,7 @@ class VinyleViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = VinyleSerializer
|
serializer_class = VinyleSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["side_identifier", "rpm"]
|
filterset_fields = ["side_identifier", "rpm"]
|
||||||
search_fields = ["$title", "side_identifier", "$authors__name"]
|
search_fields = ["title", "side_identifier", "authors__name"]
|
||||||
|
|
||||||
|
|
||||||
class RomanViewSet(viewsets.ModelViewSet):
|
class RomanViewSet(viewsets.ModelViewSet):
|
||||||
|
@ -151,7 +151,7 @@ class RomanViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = RomanSerializer
|
serializer_class = RomanSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["isbn", "side_identifier", "number_of_pages"]
|
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):
|
class RevueViewSet(viewsets.ModelViewSet):
|
||||||
|
@ -162,7 +162,7 @@ class RevueViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = RevueSerializer
|
serializer_class = RevueSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["number", "year", "month", "day", "double"]
|
filterset_fields = ["number", "year", "month", "day", "double"]
|
||||||
search_fields = ["$title"]
|
search_fields = ["title"]
|
||||||
|
|
||||||
|
|
||||||
class FutureMediaViewSet(viewsets.ModelViewSet):
|
class FutureMediaViewSet(viewsets.ModelViewSet):
|
||||||
|
@ -173,7 +173,7 @@ class FutureMediaViewSet(viewsets.ModelViewSet):
|
||||||
serializer_class = FutureMediaSerializer
|
serializer_class = FutureMediaSerializer
|
||||||
filter_backends = [DjangoFilterBackend, SearchFilter]
|
filter_backends = [DjangoFilterBackend, SearchFilter]
|
||||||
filterset_fields = ["isbn"]
|
filterset_fields = ["isbn"]
|
||||||
search_fields = ["$isbn"]
|
search_fields = ["=isbn"]
|
||||||
|
|
||||||
|
|
||||||
class EmpruntViewSet(viewsets.ModelViewSet):
|
class EmpruntViewSet(viewsets.ModelViewSet):
|
||||||
|
|
Loading…
Reference in New Issue