django管道与S3存储不压缩

时间:2014-12-26 02:22:27

标签: django django-pipeline

我正在尝试使用S3作为静态文件的生产存储,但每当我收集静态文件时,我都看到它们被上传到S3存储桶,压缩版本没有被创建/上传({{{ 1}})。

以下是我的相关内容:

output_filename

未创建PIPELINE_YUI_BINARY = '/usr/bin/yui-compressor' PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor' PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor' PIPELINE_JS = { 'main': { 'source_filenames': ( ... ), 'output_filename': 'build/app.min.js', } } PIPELINE_CSS = { 'main': { 'source_filenames': ( ... ), 'output_filename': 'build/app.min.css', 'variant': 'datauri', } } # Amazon S3 static storage AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME'] AWS_QUERYSTRING_AUTH = False AWS_IS_GZIPPED = True AWS_HEADERS = { 'Cache-Control': 'max-age=86400', } DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' # these next two aren't used, but staticfiles will complain without them STATIC_URL = "https://%s.s3.amazonaws.com/" % os.environ['AWS_STORAGE_BUCKET_NAME'] STATIC_ROOT = '' STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'pipeline.finders.PipelineFinder', ) 目录。我认为压缩机甚至不会运行。控制台没有任何投诉。我做错了什么?

0 个答案:

没有答案