这是最后几行回溯:
File "C:\PycharmDev\TestVirtualEnv\testEnv1\lib\site-packages\pipeline\compressors\__init__.py", line 247, in execute_command
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python34\Lib\subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "C:\Python34\Lib\subprocess.py", line 1112, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] ...
在 settings.py 中:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_URL = '/static/'
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATIC_URL = '/static_prepared/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static_prepared'),
]
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
PIPELINE = {
'STYLESHEETS': {
'static_prepared': {
'source_filenames': (
'*.css',
),
'output_filename': 'colors.css'
},
},
'JAVASCRIPT': {
'static_prepared': {
'source_filenames': (
'*.js',
),
'output_filename': 'stats.js',
}
}
}
我怎么了?
当我使用 manage.py collectstatic 时,它根本不适用于管道。
似乎只能像没有管道一样工作。
与没有管道相同。正常 manage.py collectstatic。
为什么会出现这个错误?
我已经在 os.path.join(BASE_DIR, ...) 上手动创建了 static 和 static_prepared 目录。
如何正确设置管道?