Ajout et début de l'API REST

This commit is contained in:
Ambulance Clerc
2023-12-14 13:55:25 +01:00
parent e7ca33031b
commit b9c93b53a9
16 changed files with 170 additions and 3 deletions

View File

@@ -55,6 +55,18 @@ INSTALLED_APPS = [
'django_summernote',
]
INSTALLED_APPS += ( 'apilog.apps.ApilogConfig',)
#Ajout de rest_framework
INSTALLED_APPS += ('rest_framework', 'rest_framework.authtoken',)
'''REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication', #Todo prod: replace by TokenAuthentication
),
# Autres paramètres de configuration...
}'''
LANGUAGE_CODE = 'fr-CH'
if not cfg_dev_mode:
@@ -117,6 +129,8 @@ MIDDLEWARE = [
'django.middleware.locale.LocaleMiddleware',
]
MIDDLEWARE += ('apilog.middleware.APILogMiddleware',)
ROOT_URLCONF = 'Reskreen.urls'
TEMPLATES = [