File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 11from rest_framework import generics
2- from rest_framework .pagination import PageNumberPagination
32
43from junction .base .constants import ProposalStatus
54from junction .proposals import serializers
65from junction .proposals .models import Proposal
76
87
9- class StandardResultsSetPagination (PageNumberPagination ):
10- page_size = 2
11- page_size_query_param = 'page'
12-
13-
148class ProposalListApiView (generics .ListAPIView ):
159
1610 serializer_class = serializers .ProposalListSerializer
17- pagination_class = StandardResultsSetPagination
1811
1912 def get_queryset (self ):
2013 queryset = Proposal .objects .filter (deleted = False , status = ProposalStatus .PUBLIC )
Original file line number Diff line number Diff line change 230230CONN_MAX_AGE = 300
231231
232232REST_FRAMEWORK = {
233- 'DEFAULT_FILTER_BACKENDS' : ('rest_framework.filters.DjangoFilterBackend' ,)
233+ 'DEFAULT_FILTER_BACKENDS' : ('rest_framework.filters.DjangoFilterBackend' ,),
234+ 'PAGE_SIZE' : 20 ,
234235}
235236
236237EXPLARA_API_TOKEN = "shjbalkfbdskjlbdskljbdskaljfb"
You can’t perform that action at this time.
0 commit comments