X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f82c3a46152b7b274576568b3626f24f51f24ce3..7c12614b8a982578f1e98a29d35ba300eb229681:/src/redakcja/settings/__init__.py diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index 3f925fd2..c7cf3244 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' @@ -69,6 +76,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', + 'admin_numeric_filter', 'django.contrib.admin', 'django.contrib.admindocs', @@ -82,6 +90,7 @@ INSTALLED_APPS = ( 'bootstrap4', 'catalogue', + 'documents', 'cover', 'dvcs', 'wiki', @@ -94,6 +103,10 @@ INSTALLED_APPS = ( if DEBUG: INSTALLED_APPS += ('debug_toolbar',) +LOCALE_PATHS = [ + PROJECT_ROOT + "/locale-contrib", +] + LOGIN_REDIRECT_URL = '/documents/user' MIN_COVER_SIZE = (915, 1270) @@ -131,11 +144,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': ( @@ -183,6 +196,7 @@ PIPELINE = { 'js/wiki/view_editor_wysiwyg.js', 'js/wiki/view_gallery.js', 'js/wiki/view_annotations.js', + 'js/wiki/view_properties.js', 'js/wiki/view_search.js', 'js/wiki/view_column_diff.js', ), @@ -219,13 +233,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 +253,7 @@ PIPELINE = { }, 'book_list': { 'source_filenames': ( - 'js/catalogue/book_list.js', + 'js/documents/book_list.js', ), 'output_filename': 'compressed/book_list.js', }