Added Auth to Django REST API
This commit is contained in:
parent
7453c056ae
commit
9e0ada5f3d
|
@ -309,6 +309,14 @@ REST_FRAMEWORK = {
|
||||||
'django_filters.rest_framework.DjangoFilterBackend',
|
'django_filters.rest_framework.DjangoFilterBackend',
|
||||||
'rest_framework.filters.OrderingFilter'
|
'rest_framework.filters.OrderingFilter'
|
||||||
),
|
),
|
||||||
|
'DEFAULT_PERMISSION_CLASSES': (
|
||||||
|
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',
|
||||||
|
),
|
||||||
|
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||||
|
'rest_framework.authentication.BasicAuthentication',
|
||||||
|
'rest_framework.authentication.SessionAuthentication',
|
||||||
|
'rest_framework.authentication.TokenAuthentication',
|
||||||
|
),
|
||||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
||||||
'PAGE_SIZE': 50
|
'PAGE_SIZE': 50
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue