를 찾을 수없는,있는 정적 파일을로드장고 - 이물 : 정적 파일이 BowerFinder에 의해로드 할 어떤 이유
설정 (서버에서 찾을 수 없음 (404)를 받고) 할 수 있습니다 djangobower.finders.BowerFinder
로드 할 수 있습니다. 평
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
이이 작업을 수행해야하므로이 경우가 아닙니다.