update api auth

v2
Laurent 3 years ago
parent fe15928374
commit f678f6c0b0
  1. 8
      padel/settings.py

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

Loading…
Cancel
Save