Lil-211. Add drf settings

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 9cae9faec1
commit 8dd14376f7
  1. 24
      project/settings.py

@ -43,6 +43,9 @@ INSTALLED_APPS = [
'polymorphic_tree',
'polymorphic',
'mptt',
'rest_framework',
'rest_framework.authtoken',
'drf_yasg',
] + [
'apps.auth.apps',
'apps.user',
@ -171,4 +174,23 @@ TWILIO_ACCOUNT = 'ACdf4a96b776cc764bc3ec0f0e136ba550'
TWILIO_TOKEN = '559a6b1fce121759c9af2dcbb3f755ea'
TWILIO_FROM_PHONE = '+37128914409'
ACTIVE_LINK_STRICT = True
ACTIVE_LINK_STRICT = True
# DRF settings
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
],
'DEFAULT_FILTER_BACKENDS': (
'rest_framework.filters.DjangoFilterBackend',
'rest_framework.filters.SearchFilter',
'rest_framework.filters.OrderingFilter',
),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 10,
}

Loading…
Cancel
Save