Commit cb310dc9b38611b0e1ccb5a1e850b4de4e62a544
1 parent
8a3b22d17c
Exists in
master
Added pagination. (maybe?)
Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff
flashcards/views.py
View file @
cb310dc
... | ... | @@ -3,6 +3,10 @@ |
3 | 3 | from rest_framework.permissions import IsAuthenticatedOrReadOnly |
4 | 4 | from rest_framework.viewsets import ModelViewSet |
5 | 5 | |
6 | +REST_FRAMEWORK = { | |
7 | + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.CursorPagination', | |
8 | + 'PAGE_SIZE': 20 | |
9 | + } | |
6 | 10 | |
7 | 11 | class SectionViewSet(ModelViewSet): |
8 | 12 | queryset = Section.objects.all() |