Cambios API Clientes permisos

This commit is contained in:
fjrodriguez
2023-09-22 15:28:52 -06:00
parent 4bdb833cdb
commit ac80bf6a45
12 changed files with 452 additions and 55 deletions

View File

@@ -27,12 +27,13 @@ INSTALLED_APPS = [
'django.contrib.messages',
#'django.contrib.sites',
'django.contrib.staticfiles',
'rest_framework',
'rest_framework.authtoken',
'allauth',
'allauth.account',
'allauth.socialaccount',
'rest_framework',
'rest_framework.authtoken',
'widget_tweaks',
'import_export',
@@ -44,7 +45,10 @@ INSTALLED_APPS = [
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.BasicAuthentication',
],
# 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
# 'PAGE_SIZE': 100,
}
SITE_ID = 1
MIDDLEWARE = [
@@ -76,8 +80,7 @@ TEMPLATES = [
},
},
]
AUTHENTICATION_BACKENDS = [
AUTHENTICATION_BACKENDS = [
# Needed to login by username in Django admin, regardless of `allauth`
'django.contrib.auth.backends.ModelBackend',