I am trying to read create mp3 files in django. but I am confused about static and static_root that I have configured. WHat happening is that in my code at a point when I p
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/')