Answer the question
In order to leave comments, you need to log in
Difference between: 1)STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') 2) STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), ]?
Is there a difference between STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
and
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
Answer the question
In order to leave comments, you need to log in
There is.
STATIC_ROOT - where djanga will put files on the collectstatic command and from where your reverse proxy (nginx / Caddy) will distribute statics. During development, this folder must be empty
STATICFILES_DIRS - folders where your static files are stored, from where they will then be copied to STATIC_ROOT during assembly
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question