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'), ]
不考虑业务场景,一味的争执技术的高下,都是耍流氓。
原文地址:https://www.cnblogs.com/leoych/p/14954538.html