가 추구하는 1.3 시도를 장고장고 정적 구조
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = BASE_PATH+'/static/'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/", "/static/admin/".
ADMIN_MEDIA_PREFIX = '/static/admin/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
나는 manage.py 명령 collectstatic를 사용하는 경우가 콜레 : 나는 다음과 같은 한 settings.py에서 이러한 설정을 설정해야합니다 (basepath은 현재 디렉토리의 바로 가기 경로입니다) '정적'디렉토리에 모든 정적 파일 (관리자 파일 포함)을 예상대로 저장합니다 ... (기본 프로젝트 디렉토리 내)
그러나이 디렉토리를 STATICFILES_DIRS 튜플에 추가하기 전까지는 내용이 제공되지 않습니다. 그러나 그렇지 않으면 나는 그들이 똑같은 수없는 오류를 얻을 것이기 때문에 STATIC_ROOT 디렉토리 설정을 변경해야한다. ...
나는 그것이 일하도록하기 위해해야 할 일이 중복 된 것 같아서 분명히 간과한다고 생각한다.
그래서 파일들이 실제로 저장되어있는 디렉토리를'STATIC_DIRS'에 넣고'STATIC_ROOT'를 __empty 디렉토리 __로 지정 했습니까? D 장고는 정적 파일을 수집 할 수 있습니까? – agf