I'm somewhat confused as to what the difference is between STATIC_URL and STATIC_ROOT in Django's 'staticfiles'
app.
I believe I understand what the STATIC_ROOT
is: it's essentially the location on the server where the staticfiles' collectstatic
command will place the static files collected from your django project. The collectstatic
command searches in the locations that you specify in the STATIC_FINDERS
setting.
However, what exactly does the STATIC_URL
do? What should this be set to? Apparently it's intended to be set something such that users can access static files. But what is it's relationship with STATIC_ROOT
?
Why is the default value of STATIC_URL
simply /static/
? Does STATIC_URL
have to be able to reference STATIC_ROOT
?