|
|
|
|
@ -114,9 +114,12 @@ AUTH_PASSWORD_VALIDATORS = [ |
|
|
|
|
REST_FRAMEWORK = { |
|
|
|
|
# Use Django's standard `django.contrib.auth` permissions, |
|
|
|
|
# or allow read-only access for unauthenticated users. |
|
|
|
|
'DEFAULT_PERMISSION_CLASSES': [ |
|
|
|
|
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly', |
|
|
|
|
'rest_framework.authentication.BasicAuthentication' |
|
|
|
|
'DEFAULT_AUTHENTICATION_CLASSES': [ |
|
|
|
|
'rest_framework.authentication.BasicAuthentication', |
|
|
|
|
'rest_framework.authentication.SessionAuthentication', |
|
|
|
|
],'DEFAULT_PERMISSION_CLASSES': [ |
|
|
|
|
# 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' |
|
|
|
|
'rest_framework.permissions.IsAdminUser', |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|