fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8da57c4
)
add search option
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 1 Apr 2025 13:37:12 +0000
(15:37 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 1 Apr 2025 13:37:12 +0000
(15:37 +0200)
src/documents/api/views.py
patch
|
blob
|
history
diff --git
a/src/documents/api/views.py
b/src/documents/api/views.py
index
36e886c
..
751a9d4
100644
(file)
--- a/
src/documents/api/views.py
+++ b/
src/documents/api/views.py
@@
-24,7
+24,10
@@
class ChunkList(ListAPIView):
queryset = models.Chunk.objects.all()
serializer_class = serializers.ChunkSerializer
filterset_fields = ['user', 'stage']
- search_fields = ['book__title']
+ search_fields = [
+ 'book__title',
+ '=book_slug',
+ ]
def get_queryset(self):
return models.Chunk.get_visible_for(self.request.user)