这是css的设置
PIPELINE_CSS = {
'base': {
'source_filenames': (
'scss/core.scss',
),
'output_filename': 'css/min.css',
},
'ie8': {
'source_filenames': (
'css/ie-8-overrides.css',
),
'output_filename': 'css/ie8.css',
},
}
不知怎的,它抱怨:
ValueError: The file 'admin/css/base.css' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x10c34add0>.
答案 0 :(得分:4)
发现它,STATICFILES_FINDERS
没有内置的django,所以在收集静态文件时,它并没有从admin复制css和js。
STATICFILES_FINDERS = (
'pipeline.finders.FileSystemFinder',
'pipeline.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
'pipeline.finders.CachedFileFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder', # added this and worked
)