mise en place du système autapp

This commit is contained in:
2024-07-14 15:10:33 +02:00
parent c29e106436
commit e02ae71c48
11 changed files with 80 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ INSTALLED_APPS = [
'django.contrib.admin',
'carnet_rouge.apps.CarnetRougeConfig',
'django_summernote',
'authapp',
]
INSTALLED_APPS += ( 'apilog.apps.ApilogConfig',)
@@ -70,6 +71,14 @@ INSTALLED_APPS += ('rest_framework', 'rest_framework.authtoken',)
),
# Autres paramètres de configuration...
}'''
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
],
}
LANGUAGE_CODE = 'fr-CH'

View File

@@ -34,6 +34,7 @@ urlpatterns = [
path('summernote/', include('django_summernote.urls')),
path('editor/', include('django_summernote.urls')),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
path('api/auth/', include('authapp.urls')),
]