【发布时间】:2014-08-27 03:48:12
【问题描述】:
现在,在运行 python manage.py collectstatic 时会生成一个缩小文件,但它完全是空的。
这是我的 settings.py(我在 windows 环境中):
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
PIPELINE_ENABLED = True
PIPELINE_DISABLE_WRAPPER = True
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
PIPELINE_YUI_BINARY = "C:\\path\\to\\the\\yuicompressor.jar"
PIPELINE_JS = {
'chat': {
'source_filenames': (
'js/apps/chat/controllers/chatcontrollers.js',
),
'output_filename': 'js/test.min.js',
}
}
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR,"static/")
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(
BASE_DIR,
'media_src',
),
)
我看到了这个回复:Django pipeline generates empty files 已经,但我的文件位于
myapp/media_src/js/apps/chat/controllers/
【问题讨论】:
标签: django yui-compressor django-pipeline