X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f82c3a46152b7b274576568b3626f24f51f24ce3..6b985a0a184c49324857d01b2f22fd23ebd5f5a4:/src/redakcja/settings/__init__.py diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index 3f925fd2..8b7b9c4b 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -43,8 +43,14 @@ MIDDLEWARE = [ 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django_cas_ng.middleware.CASMiddleware', + ] +if CAS_SERVER_URL: + MIDDLEWARE.append( + 'django_cas_ng.middleware.CASMiddleware', + ) + +MIDDLEWARE += [ 'django.contrib.admindocs.middleware.XViewMiddleware', 'fnp_django_pagination.middleware.PaginationMiddleware', 'maintenancemode.middleware.MaintenanceModeMiddleware', @@ -55,10 +61,11 @@ if DEBUG: 'debug_toolbar.middleware.DebugToolbarMiddleware', ] + MIDDLEWARE -AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.ModelBackend', - 'django_cas_ng.backends.CASBackend', -) +if CAS_SERVER_URL: + AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'django_cas_ng.backends.CASBackend', + ) ROOT_URLCONF = 'redakcja.urls' @@ -82,6 +89,7 @@ INSTALLED_APPS = ( 'bootstrap4', 'catalogue', + 'documents', 'cover', 'dvcs', 'wiki', @@ -131,11 +139,11 @@ PIPELINE = { ), 'output_filename': 'compressed/detail_styles.css', }, - 'catalogue': { + 'documents': { 'source_filenames': ( 'css/filelist.css', ), - 'output_filename': 'compressed/catalogue_styles.css', + 'output_filename': 'compressed/documents_styles.css', }, 'book': { 'source_filenames': ( @@ -219,13 +227,13 @@ PIPELINE = { ), 'output_filename': 'compressed/detail_img_scripts.js', }, - 'catalogue': { + 'documents': { 'source_filenames': ( - 'js/catalogue/catalogue.js', + 'js/documents/documents.js', 'js/slugify.js', 'email_mangler/email_mangler.js', ), - 'output_filename': 'compressed/catalogue_scripts.js', + 'output_filename': 'compressed/documents_scripts.js', }, 'book': { 'source_filenames': ( @@ -239,7 +247,7 @@ PIPELINE = { }, 'book_list': { 'source_filenames': ( - 'js/catalogue/book_list.js', + 'js/documents/book_list.js', ), 'output_filename': 'compressed/book_list.js', }