diff --git a/flashcards/views.py b/flashcards/views.py index 9dba6dd..eff61f9 100644 --- a/flashcards/views.py +++ b/flashcards/views.py @@ -3,11 +3,6 @@ from flashcards.serializers import SectionSerializer, LecturePeriodSerializer from rest_framework.permissions import IsAuthenticatedOrReadOnly from rest_framework.viewsets import ModelViewSet -REST_FRAMEWORK = { - 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.CursorPagination', - 'PAGE_SIZE': 20 - } - class SectionViewSet(ModelViewSet): queryset = Section.objects.all() serializer_class = SectionSerializer diff --git a/flashy/settings.py b/flashy/settings.py index 712c148..6a3d0e1 100644 --- a/flashy/settings.py +++ b/flashy/settings.py @@ -42,6 +42,11 @@ INSTALLED_APPS = ( 'flashcards', ) +REST_FRAMEWORK = { + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.CursorPagination', + 'PAGE_SIZE': 20 +} + MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', @@ -103,4 +108,4 @@ USE_TZ = True # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATIC_URL = '/static/' -STATIC_ROOT = 'static' \ No newline at end of file +STATIC_ROOT = 'static'