diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py index 5971f257a..9e938d703 100644 --- a/test_project/test_project/settings.py +++ b/test_project/test_project/settings.py @@ -45,7 +45,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.staticfiles', 'reversion', - + 'rest_framework.authtoken' ) # A dedicated place to register Modoboa applications @@ -135,6 +135,17 @@ STATICFILES_DIRS = ( MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +# Rest framework settings + +REST_FRAMEWORK = { + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.TokenAuthentication', + ), + 'DEFAULT_PERMISSION_CLASSES': ( + 'rest_framework.permissions.IsAuthenticated', + ) +} + # Modoboa settings #MODOBOA_CUSTOM_LOGO = os.path.join(MEDIA_URL, "custom_logo.png")