• Download Gist
0001-make-it-work-with-s3-storage.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
From 6c9496872723a2d9a23a709ac587cd90181107c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timothe=CC=81e=20Peignier?= <timothee.peignier@tryphon.org>
Date: Thu, 8 Mar 2012 09:02:01 +0100
Subject: [PATCH] make it work with s3 storage
 
---
settings.py | 6 ++----
storage.py | 9 +++++++++
2 files changed, 11 insertions(+), 4 deletions(-)
create mode 100644 storage.py
 
diff --git a/settings.py b/settings.py
index 83ae574..bc40897 100644
--- a/settings.py
+++ b/settings.py
@@ -107,10 +107,8 @@ PIPELINE_JS = {
}
}
-STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
-# PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage'
-PIPELINE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
-PIPELINE = True
+STATICFILES_STORAGE = 'simple_pipeline.storage.S3PipelineStorage'
+PIPELINE = not DEBUG
PIPELINE_CSS_COMPRESSOR = 'simple_pipeline.myapp.compressors.CssminCompressor'
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor'
PIPELINE_COMPILERS = (
diff --git a/storage.py b/storage.py
new file mode 100644
index 0000000..6b9d85c
--- /dev/null
+++ b/storage.py
@@ -0,0 +1,9 @@
+from staticfiles.storage import CachedFilesMixin
+
+from pipeline.storage import PipelineMixin
+
+from storages.backends.s3boto import S3BotoStorage
+
+
+class S3PipelineStorage(PipelineMixin, CachedFilesMixin, S3BotoStorage):
+ pass
--
1.7.9.3

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.