X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9ff5f2ac22360b1ff3ef2473c15d4acfd1e7769b..1cc3cb0514586ece78aa7b03bf19e83e7b3789a3:/src/documents/api/views.py diff --git a/src/documents/api/views.py b/src/documents/api/views.py index a2f3529d..751a9d41 100644 --- a/src/documents/api/views.py +++ b/src/documents/api/views.py @@ -23,8 +23,11 @@ class BookDetail(RetrieveAPIView): class ChunkList(ListAPIView): queryset = models.Chunk.objects.all() serializer_class = serializers.ChunkSerializer - filter_fields = ['user', 'stage'] - search_fields = ['book__title'] + filterset_fields = ['user', 'stage'] + search_fields = [ + 'book__title', + '=book_slug', + ] def get_queryset(self): return models.Chunk.get_visible_for(self.request.user)