1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 17:00:34 +02:00
This commit is contained in:
Yohann D'ANELLO
2020-04-30 19:12:15 +02:00
parent 683d523da9
commit eee7fc845c
10 changed files with 272 additions and 2 deletions

View File

@ -65,6 +65,7 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sites.middleware.CurrentSiteMiddleware',
'tfjm.middlewares.TurbolinksMiddleware',
]
ROOT_URLCONF = 'tfjm.urls'
@ -127,6 +128,17 @@ PASSWORD_HASHERS = [
'django.contrib.auth.hashers.BCryptPasswordHasher',
]
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAdminUser'
],
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication',
],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 50,
}
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/