Updates
[redakcja.git] / src / redakcja / settings / __init__.py
index 3eed3e4..cd60b49 100644 (file)
@@ -19,16 +19,6 @@ STATICFILES_DIRS = [
     PROJECT_ROOT + '/static/'
 ]
 
     PROJECT_ROOT + '/static/'
 ]
 
-DATABASES = {
-    'default': {
-        'ENGINE': 'django.db.backends.postgresql',
-        'HOST': 'db',
-        'USER': os.environ.get('POSTGRES_USER'),
-        'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
-        'NAME': os.environ.get('POSTGRES_USER'),
-    }
-}
-
 TEMPLATES = [
     {
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
 TEMPLATES = [
     {
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
@@ -129,6 +119,8 @@ INSTALLED_APPS = (
 if DEBUG:
     INSTALLED_APPS += ('debug_toolbar',)
 
 if DEBUG:
     INSTALLED_APPS += ('debug_toolbar',)
 
+FORMS_URLFIELD_ASSUME_HTTPS = True
+
 LOCALE_PATHS = [
     PROJECT_ROOT + "/locale-contrib",
 ]
 LOCALE_PATHS = [
     PROJECT_ROOT + "/locale-contrib",
 ]
@@ -148,14 +140,24 @@ STATICFILES_FINDERS = (
     'pipeline.finders.PipelineFinder',
 )
 
     'pipeline.finders.PipelineFinder',
 )
 
-STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
+STORAGES = {
+    'default': {
+        'BACKEND': 'django.core.files.storage.FileSystemStorage'
+    },
+    'staticfiles': {
+        'BACKEND': 'pipeline.storage.PipelineManifestStorage',
+    },
+}
 
 PIPELINE = {
 
 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': {
 
     # CSS and JS files to compress
     'STYLESHEETS': {
@@ -298,7 +300,7 @@ PIPELINE = {
 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
 
 
 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
 
 
-SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
+SESSION_SERIALIZER = 'redakcja.serializer.JSONWithPickleFallbackSerializer'
 
 
 REST_FRAMEWORK = {
 
 
 REST_FRAMEWORK = {
@@ -320,6 +322,8 @@ LANGUAGES = [
 ]
 
 
 ]
 
 
+USE_TZ = True
+
 TEST_INTEGRATION = False
 
 
 TEST_INTEGRATION = False