66from os .path import abspath , dirname , join
77
88import dc_design_system
9+ from dc_utils .settings .pipeline import * # noqa
10+ from dc_utils .settings .pipeline import get_pipeline_settings
911
1012
1113def here (x ):
@@ -51,7 +53,10 @@ def root(x):
5153STATIC_URL = "/static/"
5254STATICFILES_DIRS = (root ("assets" ),)
5355
54- DEFAULT_FILE_STORAGE = "electionleaflets.storages.TempUploadLocalMediaStorage"
56+ STORAGES ["default" ] = { # noqa F405
57+ "BACKEND" : "electionleaflets.storages.TempUploadLocalMediaStorage"
58+ }
59+
5560AWS_S3_FILE_OVERWRITE = False
5661STATICFILES_MANIFEST_NAME = environ .get (
5762 "STATICFILES_MANIFEST_NAME" , "staticfiles.json"
@@ -61,61 +66,33 @@ def root(x):
6166# AWS_S3_HOST = "s3-eu-west-1.amazonaws.com"
6267# AWS_S3_CUSTOM_DOMAIN = "data.electionleaflets.org"
6368
64- PIPELINE = {
65- "COMPILERS" : ("pipeline.compilers.sass.SASSCompiler" ,),
66- "SASS_BINARY" : "pysassc" ,
67- "CSS_COMPRESSOR" : "pipeline.compressors.NoopCompressor" ,
68- "STYLESHEETS" : {
69- "styles" : {
70- "source_filenames" : [
71- "scss/styles.scss" ,
72- "scss/vendor/filepond.css" ,
73- "scss/vendor/filepond-plugin-image-preview.css" ,
74- ],
75- "output_filename" : "scss/styles.css" ,
76- "extra_context" : {
77- "media" : "screen,projection" ,
78- },
79- },
80- },
81- "JAVASCRIPT" : {
82- "scripts" : {
83- "source_filenames" : [
84- "javascript/app.js" ,
85- "javascript/vendor/filepond.js" ,
86- "javascript/vendor/filepond-plugin-image-exif-orientation.js" ,
87- "javascript/vendor/filepond-plugin-image-preview.js" ,
88- "javascript/image_uploader.js" ,
89- # "javascript/vendor/ImageEditor.js",
90- ],
91- "output_filename" : "app.js" ,
92- }
93- },
94- }
95-
69+ PIPELINE = get_pipeline_settings (
70+ extra_css = [
71+ "scss/styles.scss" ,
72+ "scss/vendor/filepond.css" ,
73+ "scss/vendor/filepond-plugin-image-preview.css" ,
74+ ],
75+ extra_js = [
76+ "javascript/app.js" ,
77+ "javascript/vendor/filepond.js" ,
78+ "javascript/vendor/filepond-plugin-image-exif-orientation.js" ,
79+ "javascript/vendor/filepond-plugin-image-preview.js" ,
80+ "javascript/image_uploader.js" ,
81+ # "javascript/vendor/ImageEditor.js",
82+ ],
83+ )
9684
97- PIPELINE ["CSS_COMPRESSOR" ] = "pipeline.compressors.NoopCompressor"
9885PIPELINE ["JS_COMPRESSOR" ] = "pipeline.compressors.NoopCompressor"
9986
100-
10187PIPELINE ["SASS_ARGUMENTS" ] = (
10288 " -I " + dc_design_system .DC_SYSTEM_PATH + "/system"
10389)
10490
105- STATICFILES_FINDERS = (
106- "django.contrib.staticfiles.finders.FileSystemFinder" ,
107- "django.contrib.staticfiles.finders.AppDirectoriesFinder" ,
108- "pipeline.finders.CachedFileFinder" ,
109- "pipeline.finders.PipelineFinder" ,
110- "pipeline.finders.ManifestFinder" ,
111- )
112-
11391WHITENOISE_STATIC_PREFIX = "/static/"
11492
11593SITE_ID = 1
11694SITE_LOGO = "images/logo.png"
11795USE_I18N = False
118- USE_L10N = True
11996LOGIN_URL = "/"
12097
12198# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
@@ -173,7 +150,6 @@ def root(x):
173150 "s3file" ,
174151 "django_filters" ,
175152 "dc_utils" ,
176- "querystring_tag" ,
177153] + LEAFLET_APPS
178154
179155
0 commit comments