Static Root and Static Url confusion in Django
From the django docs,
STATIC_ROOT
is the absolute path to the directory where collectstatic will collect static files for deployment.
STATIC_URL
is the URL to use when referring to static files located in STATIC_ROOT
.
So, when you request some specific static resource, it is searched in STATIC_ROOT + STATIC_URL
and then served.
Now in your problem, you do
STATIC_ROOT = os.path.join(BASE_DIR, 'play/static_root')
STATIC_URL = '/static/'
which means django would have effectively been searching in BASE_DIR/play/static_root/static/
which would be incorrect, so looking at other paths you can figure out that you need to do
STATIC_ROOT = os.path.join(BASE_DIR, 'play/')
내의견
STATICFILES_DIRS 는 실제 개발자가 화일들을 저장해놓은 곳이며 django가 검색해서 STATIC_ROOT의 경로에 복사해서 놓는다.이 곳으로부터 화일이 user들의 브라우저로 전송된다. STATIC_URL은 STATIC_ROOT에 덧붙여져서 화일의 URL경로가 완성되게 한다.