1. 程式人生 > >django 報錯 : django.core.exceptions.ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting

django 報錯 : django.core.exceptions.ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting

style core dir color red djang prop 文件 root

錯誤原因有可能是在settings中靜態文件目錄設置的有問題

STATIC_ROOT=os.path.join(BASE_DIR,"static/")#錯誤
STATIC_ROOT=os.path.join(BASE_DIR,"/static/")#正確

django 報錯 : django.core.exceptions.ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting