Apply read filtering
This commit is contained in:
parent
ad7d18b1e2
commit
34546e49cf
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ from newsreader.news.core.serializers import CategorySerializer, PostSerializer
|
||||||
|
|
||||||
|
|
||||||
class ListPostView(ListAPIView):
|
class ListPostView(ListAPIView):
|
||||||
queryset = Post.objects.all()
|
queryset = Post.objects.filter(read=False)
|
||||||
serializer_class = PostSerializer
|
serializer_class = PostSerializer
|
||||||
permission_classes = (IsAuthenticated, IsPostOwner)
|
permission_classes = (IsAuthenticated, IsPostOwner)
|
||||||
pagination_class = CursorPagination
|
pagination_class = CursorPagination
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue