From: Hongyuan Ma Date: Mon, 2 Jul 2018 15:59:22 +0000 (+0800) Subject: add SessionAuthentication X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=2f11c8f147578231cc700df7b138a3bc06dd5a32;p=pgperffarm.git add SessionAuthentication --- 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 }