Permalink
Browse files

add doc on how to use a custom storage

  • Loading branch information...
1 parent 76a15ce commit 5c29dcaf9496eedaa1c0982466dd284fbdd7cc13 @cyberdelia cyberdelia committed May 3, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 docs/storages.rst
View
@@ -31,3 +31,23 @@ Pipeline is also providing a storage that play nicely with staticfiles app
particularly for development : ::
PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage'
+
+
+Using with other storages
+=========================
+
+You can also use your own custom storage, for example, if you want to use S3 for your assets : ::
+
+ STATICFILES_STORAGE = 'your.app.S3PipelineStorage'
+
+Your storage only need to inherit from ``PipelineMixin`` and/or ``CachedFilesMixin`` : ::
+
+ from staticfiles.storage import CachedFilesMixin
+
+ from pipeline.storage import PipelineMixin
+
+ from storages.backends.s3boto import S3BotoStorage
+
+
+ class S3PipelineStorage(PipelineMixin, CachedFilesMixin, S3BotoStorage):
+ pass

0 comments on commit 5c29dca

Please sign in to comment.