Django: ERRORS: ?: (staticfiles.E001) The STATICFILES_DIRS setting is not a tuple or list. HINT: Perhaps you forgot a trailing comma?

必须是数组或者列表类型

如下所示:

# 错误
#
STATICFILES_DIRS = { # os.path.join(BASE_DIR, 'static'), # }
# 正确 STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), ]

 

posted @ 2021-06-30 15:06  胸怀丶若谷  阅读(259)  评论(0编辑  收藏  举报