Commit 1f63d165 by muzaffaryousaf

Set page size to 25 TNL-4108

parent 333ce86a
...@@ -5,12 +5,14 @@ Paginator for Notes. ...@@ -5,12 +5,14 @@ Paginator for Notes.
from rest_framework import pagination from rest_framework import pagination
from rest_framework.response import Response from rest_framework.response import Response
from django.conf import settings
class NotesPaginator(pagination.PageNumberPagination): class NotesPaginator(pagination.PageNumberPagination):
""" """
Student Notes Paginator. Student Notes Paginator.
""" """
page_size = 10 page_size = settings.DEFAULT_NOTES_PAGE_SIZE
page_size_query_param = "page_size" page_size_query_param = "page_size"
def get_paginated_response(self, data): def get_paginated_response(self, data):
......
...@@ -30,7 +30,7 @@ class AnnotationSearchView(GenericAPIView): ...@@ -30,7 +30,7 @@ class AnnotationSearchView(GenericAPIView):
The annotations are always sorted in descending order by updated date. The annotations are always sorted in descending order by updated date.
Each page in the list contains 10 annotations by default. The page Each page in the list contains 25 annotations by default. The page
size can be altered by passing parameter "page_size=<page_size>". size can be altered by passing parameter "page_size=<page_size>".
Http400 is returned if the format of the request is not correct. Http400 is returned if the format of the request is not correct.
...@@ -165,7 +165,7 @@ class AnnotationListView(GenericAPIView): ...@@ -165,7 +165,7 @@ class AnnotationListView(GenericAPIView):
The annotations are always sorted in descending order by updated date. The annotations are always sorted in descending order by updated date.
Each page in the list contains 10 annotations by default. The page Each page in the list contains 25 annotations by default. The page
size can be altered by passing parameter "page_size=<page_size>". size can be altered by passing parameter "page_size=<page_size>".
Http400 is returned if the format of the request is not correct. Http400 is returned if the format of the request is not correct.
......
...@@ -81,3 +81,5 @@ CORS_ALLOW_HEADERS = ( ...@@ -81,3 +81,5 @@ CORS_ALLOW_HEADERS = (
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
'templates', 'templates',
) )
DEFAULT_NOTES_PAGE_SIZE = 25
...@@ -42,3 +42,5 @@ LOGGING = { ...@@ -42,3 +42,5 @@ LOGGING = {
} }
}, },
} }
DEFAULT_NOTES_PAGE_SIZE = 10
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