diff --git a/representatives_votes/api.py b/representatives_votes/api.py index c277322f5c8713d559e0d0a9b92f811154043346..4b9403ea081a09492fcd125cf90522c55eceb16c 100644 --- a/representatives_votes/api.py +++ b/representatives_votes/api.py @@ -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