Forums

STATIC_ROOT path doubts

Hello everyone,

I am wondering whether there is a difference between the following two statements in a Django settings.py

STATIC_ROOT = 'static/'  # this is what Django creates by default in a new settings.py file

and

STATIC_ROOT = '/static/'  # this is what PA recommends

Thank you,

Hmm, that sounds like it might be an error in our docs -- where are you seeing the recommendation to set STATIC_ROOT to `'/static/' with a leading slash?

I apologize, I meant STATIC_URL.

static/ is a relative path and /static/ is absolute. I recommend using the absolute path so that the URLs consistently resolve correctly.