From 2f11c8f147578231cc700df7b138a3bc06dd5a32 Mon Sep 17 00:00:00 2001 From: Hongyuan Ma Date: Mon, 2 Jul 2018 23:59:22 +0800 Subject: [PATCH] add SessionAuthentication --- web/pgperffarm/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/pgperffarm/settings.py b/web/pgperffarm/settings.py index c6210ff..fdb650d 100644 --- a/web/pgperffarm/settings.py +++ b/web/pgperffarm/settings.py @@ -136,6 +136,11 @@ REST_FRAMEWORK = { # 'rest_framework.authentication.SessionAuthentication', # ), # 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), + + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.BasicAuthentication', + 'rest_framework.authentication.SessionAuthentication', + ), 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'PAGE_SIZE': 20 } -- 2.39.5