I am trying to use django-pipeline-1.1.27 with s3boto to compress and filter static files and then load them into an s3 bucket. If I just use:
PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage'
Then it works, and I get a static folder with a nice versioned file that I configured. As soon as i switch to
PIPELINE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
I get
Traceback (most recent call last): File "manage.py", line 15, in <module> execute_manager(settings) File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/management/commands/synccompress.py", line 39, in handle packager.pack_stylesheets(package, sync=sync, force=force) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/packager.py", line 52, in pack_stylesheets **kwargs) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/packager.py", line 60, in pack package['output'], package['paths']) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/__init__.py", line 45, in need_update version = self.version(paths) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/__init__.py", line 20, in version return getattr(self.versioner, 'version')(paths) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/hash/__init__.py", line 37, in version buf = self.concatenate(paths) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/hash/__init__.py", line 27, in concatenate return '\n'.join([self.read_file(path) for path in paths]) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/hash/__init__.py", line 31, in read_file file = storage.open(path, 'rb') File "/my/virtual/env/lib/python2.7/site-packages/django/core/files/storage.py", line 33, in open file = self._open(name, mode) File "/my/virtual/env/lib/python2.7/site-packages/storages/backends/s3boto.py", line 177, in _open raise IOError('File does not exist: %s' % name) IOError: File does not exist: css/style.css
which is one of my source files. So, why does the pipeline no longer want to execute the filter / concatenate / compress steps when switching to s3boto repository?
Maybe I'm doing something. Here is another configuration if this helps:
INSTALLED_APPS = ( ... 'pipeline', 'storages', ) STATICFILES_FINDERS = ( 'pipeline.finders.PipelineFinder', 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) STATIC_ROOT = "/some/path/outside/django_project/deploy_static" STATICFILES_DIRS = () # All statics in this site are in apps STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage' PIPELINE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' PIPELINE = True PIPELINE_AUTO = True PIPELINE_VERSION = True PIPELINE_VERSION_PLACEHOLDER = 'VERSION' PIPELINE_VERSIONING = 'pipeline.versioning.hash.SHA1Versioning' PIPELINE_CSS = { 'standard': { 'source_filenames': ( 'css/style.css', ... ), 'output_filename': 'css/all-VERSION.css', 'extra_context': { 'media': 'screen,projection', }, } }
My site is on Django 1.3.1.
The command that I run:
python manage.py synccompress --force
AWS credit cards are also in the settings, but this is a moot point, because it doesnโt even get to this point.
UPDATE Added full stack and settings requested in comments
UPDATE . At the request of the author of the library, I tried updating to the latest beta. Observations from this so far:
- I do not know how to get compressed files with version now
- collectstatic leaves me with compressed files and originals
- Still getting the same error from the django pipeline when the boto configuration is configured: it wants to send my source files to s3, but I donโt even see where it places my assets. Nothing fits in STATIC_ROOT.
UPDATE I created a simple project that works for the crawler repository and then splits into S3Boto. I pushed it to github and enabled stacktrace capture.
https://github.com/estebistec/simple_pipeline https://raw.github.com/estebistec/simple_pipeline/master/STACKTRACE
I would be delighted if I were told that I am doing some really dumb ones, and that should all work.