[Fixed]-Django The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting

3👍

Maybe this will help:

STATIC_URL = '/static/'
    
if not DEBUG:
    STATIC_ROOT = ''
    
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static/'),
]
👤jack

1👍

The problem is in the STATIC_ROOT and STATICFILES_DIRS there names cant be same.
static root is used for collectstatic command of django.
You can remove it if not using it.
And can also remove static files dirs if not changing its default position(inside django app) to somewhere else like base or something.

👤Amit

Leave a comment