Commit 28e591c7 authored by Jamesie Pic's avatar Jamesie Pic

Added default pagination for web browser

parent ae8a230a
......@@ -9,6 +9,8 @@ from rest_framework import (
viewsets,
)
from representatives.api import DefaultWebPagination
from representatives_votes.serializers import (
DossierDetailSerializer,
DossierSerializer,
......@@ -23,6 +25,7 @@ class DossierViewSet(viewsets.ReadOnlyModelViewSet):
API endpoint that allows dossiers to be viewed.
"""
pagination_class = DefaultWebPagination
queryset = Dossier.objects.all()
serializer_class = DossierSerializer
......@@ -61,6 +64,7 @@ class ProposalViewSet(viewsets.ReadOnlyModelViewSet):
API endpoint that allows proposals to be viewed.
"""
pagination_class = DefaultWebPagination
queryset = Proposal.objects.select_related('dossier')
serializer_class = ProposalSerializer
......@@ -103,6 +107,7 @@ class VoteViewSet(viewsets.ReadOnlyModelViewSet):
API endpoint that allows proposals to be viewed.
"""
pagination_class = DefaultWebPagination
queryset = Vote.objects.select_related('representative', 'proposal')
serializer_class = VoteSerializer
......
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