projects
/
pgperffarm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16acaa5
)
add SessionAuthentication
author
Hongyuan Ma
<CS_MaleicAcid@163.com>
Mon, 2 Jul 2018 15:59:22 +0000
(23:59 +0800)
committer
Hongyuan Ma
<CS_MaleicAcid@163.com>
Mon, 2 Jul 2018 15:59:22 +0000
(23:59 +0800)
web/pgperffarm/settings.py
patch
|
blob
|
blame
|
history
diff --git
a/web/pgperffarm/settings.py
b/web/pgperffarm/settings.py
index c6210ff231cab6d4300ad73e0f8ac267bd3a1e74..fdb650dd46d3b894750f47fe769c02efd2ff7b5d 100644
(file)
--- 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
}