3

这是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>.
4

1 回答 1

4

找到它,STATICFILES_FINDERS没有内置的 django,所以在收集静态文件时,它没有从管理员那里复制 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
)
于 2014-03-22T20:01:45.743 回答