を見つけていない、djangobower.finders.BowerFinder
によってロードされる静的ファイルはジャンゴ・バウワー:BowerFinderによってロードされる静的ファイルが何らかの理由で
設定(サーバ内に見つからない404を取得)をロードされていません。 PY
STATIC_ROOT = "/root/Desktop/django-DefectDojo/static/"
STATIC_URL = '/static/'
STATICFILES_DIRS =()
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'djangobower.finders.BowerFinder',
)
BOWER_COMPONENTS_ROOT = '/root/Desktop/django-DefectDojo/components/'
BOWER_INSTALLED_APPS = (
'jquery-ui',
)
INSTALLED_APPS = (
'djangobower',
)
テンプレート
<script src="{% static "jquery-ui/jquery-ui.min.js" %}"></script>
プロジェクト構造
-project root
-static
-components
-vendor
-assets
-bower-components
-jquery-ui
-jquery-ui.min.js
私は./manage.py collectstatic
続い./manage.py bower install
は今、サーバーを実行する上で、私が見つかりません入手できます。
ただし、STATICFILES_DIRS = ('/root/Desktop/django-DefectDojo/components/vendor/assets/bower_components/',)
を作成すると、静的ファイルがロードされます。 しかし、これは、BowerFinder
がこれを行うことになっているため、そうではありません。