Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-notes-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-notes-api
Commits
ec24a5d4
Commit
ec24a5d4
authored
Feb 10, 2016
by
Muzaffar yousaf
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38 from edx/muzaffar/set_page_size
Set page size to 25
parents
333ce86a
1f63d165
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
notesapi/v1/paginators.py
+3
-1
notesapi/v1/views.py
+2
-2
notesserver/settings/common.py
+2
-0
notesserver/settings/test.py
+2
-0
No files found.
notesapi/v1/paginators.py
View file @
ec24a5d4
...
@@ -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
):
...
...
notesapi/v1/views.py
View file @
ec24a5d4
...
@@ -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.
...
...
notesserver/settings/common.py
View file @
ec24a5d4
...
@@ -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
notesserver/settings/test.py
View file @
ec24a5d4
...
@@ -42,3 +42,5 @@ LOGGING = {
...
@@ -42,3 +42,5 @@ LOGGING = {
}
}
},
},
}
}
DEFAULT_NOTES_PAGE_SIZE
=
10
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment