以前は django-pipeline 1.2.6 を使用していましたが、静的ファイルの検索に問題はありませんでした。アップグレード後、静的ファイルがどこにあるかを見つけることができなくなりました。何が悪いのかわかりませんが、おそらく何かが足りないだけです。
次のエラーが表示されます。
ValueError: The file 'stylesheets/application.css.sass' could not be found with <pipeline.storage.PipelineFinderStorage object at 0x106e8b290>.
私はジャンゴ1.4を使用しています。ここに私の設定があります:
path = lambda *a: os.path.join(ROOT_PATH, *a)
MEDIA_ROOT = ''
MEDIA_URL = ''
STATIC_ROOT = path('assets/')
STATIC_URL = 'assets/'
STATICFILES_DIRS = ()
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
INSTALLED_APPS = (
# ...
'django.contrib.staticfiles',
'pipeline',
'app',
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
PIPELINE_COMPILERS = (
'pipeline.compilers.sass.SASSCompiler',
'pipeline.compilers.coffee.CoffeeScriptCompiler',
)
PIPELINE_CSS = {
'application': {
'source_filenames': (
'stylesheets/application.css.sass',
),
'output_filename': 'stylesheets/application.css',
},
}
PIPELINE_JS = {
'application': {
'source_filenames': (
'javascripts/application.js.coffee',
),
'output_filename': 'javascripts/application.js',
}
}
助けてください。
興味深い情報: PIPELINE_CSS を完全に削除すると、javascripts/application.js.coffee も見つかりません。
もう 1 つの興味深い点は、使用する django-pipeline のバージョンに関係なく、次の結果が得られることです。
$ python manage.py findstatic stylesheets/application.css.sass
No matching file found for 'stylesheets/application.css.sass'.
私は何を間違っていますか?