|
|
|
|
@ -46,6 +46,7 @@ INSTALLED_APPS = [ |
|
|
|
|
'rest_framework', |
|
|
|
|
'rest_framework.authtoken', |
|
|
|
|
'drf_yasg', |
|
|
|
|
'corsheaders', |
|
|
|
|
] + [ |
|
|
|
|
'apps.auth.apps', |
|
|
|
|
'apps.user', |
|
|
|
|
@ -57,6 +58,7 @@ if DEBUG: |
|
|
|
|
INSTALLED_APPS += ['silk'] |
|
|
|
|
|
|
|
|
|
MIDDLEWARE = [ |
|
|
|
|
'corsheaders.middleware.CorsMiddleware', |
|
|
|
|
'django.middleware.security.SecurityMiddleware', |
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware', |
|
|
|
|
'django.middleware.common.CommonMiddleware', |
|
|
|
|
@ -198,3 +200,8 @@ REST_FRAMEWORK = { |
|
|
|
|
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', |
|
|
|
|
'PAGE_SIZE': 10, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# CORS settings |
|
|
|
|
|
|
|
|
|
if DEBUG: |
|
|
|
|
CORS_ORIGIN_ALLOW_ALL = True |
|
|
|
|
|