出现下面的错误
django
.core
.management
.base
.SystemCheckError
: SystemCheckError
: System check identified some issues
:
ERRORS
:
?: (staticfiles
.E001
) The STATICFILES_DIRS setting is not a tuple or list
.
HINT
: Perhaps you forgot a trailing comma
?
是因为setting.py中
STATICFILES_DIR
={
os
.path
.join
(BASE_DIR
,'static')
}
STATICFILES_DIR
=(
os
.path
.join
(BASE_DIR
,'static')
)
上面的这两种写法都会导致出现错误
正确的写法是:
STATICFILES_DIR
=(
os
.path
.join
(BASE_DIR
,'static'),
)