diff --git a/server/server/settings.py b/server/server/settings.py index 62618eb..0d3cddd 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -143,4 +143,31 @@ USE_TZ = True STATIC_URL = '/static/' + +DEFAULT_RENDERER_CLASSES = ( + 'rest_framework.renderers.JSONRenderer', +) + +if DEBUG: + DEFAULT_RENDERER_CLASSES += ( + 'rest_framework.renderers.BrowsableAPIRenderer', + ) + +DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.TokenAuthentication', + ) + +if DEBUG: + DEFAULT_AUTHENTICATION_CLASSES += ( + 'rest_framework.authentication.SessionAuthentication', + ) + +REST_FRAMEWORK = { + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', + 'PAGE_SIZE': 300, + 'DEFAULT_RENDERER_CLASSES': DEFAULT_RENDERER_CLASSES, + 'DEFAULT_AUTHENTICATION_CLASSES': DEFAULT_AUTHENTICATION_CLASSES, +} + + SITE_ID = 1