X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f8eb70938e6ea3b3c4fac5e2f55df26fcaf21b48..c32ea85e72f0c061117256319580f935b9419364:/src/redakcja/settings/__init__.py?ds=inline diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index ce3289b0..bdcb8a21 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -1,11 +1,15 @@ # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # -import os.path +import os import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration from .defaults import * -from ..localsettings import * + +try: + from ..localsettings import * +except ImportError: + pass DATA_UPLOAD_MAX_MEMORY_SIZE = 20000000 @@ -70,6 +74,7 @@ ROOT_URLCONF = 'redakcja.urls' INSTALLED_APPS = ( 'modeltranslation', + 'reversion', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -107,6 +112,8 @@ INSTALLED_APPS = ( 'wlxml.apps.WlxmlConfig', 'alerts', 'team', + 'sources', + 'isbn', ) if DEBUG: @@ -118,8 +125,6 @@ LOCALE_PATHS = [ LOGIN_REDIRECT_URL = '/documents/user' -MIN_COVER_SIZE = (915, 1270) - LEGIMI_SMALL_WORDS = 2000 LEGIMI_BIG_WORDS = 10000 LEGIMI_SMALL_PRICE = 7 @@ -136,11 +141,14 @@ STATICFILES_FINDERS = ( STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage' PIPELINE = { - 'CSS_COMPRESSOR': None, - 'JS_COMPRESSOR': None, - 'COMPILERS': ( - 'libsasscompiler.LibSassCompiler', - ), + 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor', + 'COMPILERS': ('pipeline.compilers.sass.SASSCompiler',), + 'SASS_BINARY': '/opt/dart-sass/sass', + 'SASS_ARGUMENTS': '--embed-source-map --embed-sources', + # Compress CSSwith a second run of dart-sass. + 'CSS_COMPRESSOR': 'pipeline.compressors.cssmin.CSSMinCompressor', + 'CSSMIN_BINARY': '/opt/dart-sass/sass', + 'CSSMIN_ARGUMENTS': '--stdin --style=compressed --no-source-map', # CSS and JS files to compress 'STYLESHEETS': { @@ -153,7 +161,7 @@ PIPELINE = { 'css/history.css', 'css/summary.css', 'css/imgareaselect-default.css', - 'css/dialogs.css', + 'css/dialogs.scss', 'wiki/scss/splitter.scss', 'wiki/scss/visual.scss' @@ -305,6 +313,8 @@ LANGUAGES = [ ] +USE_TZ = True + TEST_INTEGRATION = False