(staticfiles.E001) The STATICFILES_DIRS setting is not a tuple or list.

问题:win系统下,python 3+、Django 2.0.3环境,在Django运行时报错,信息如下:

Unhandled exception in thread started by .wrapper at 0x000002203F3FEC80>

Traceback (most recent call last):

File "C:\Program Files\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper

fn(*args, **kwargs)

File "C:\Program Files\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 120, in inner_run

self.check(display_num_errors=True)

File "C:\Program Files\Python\Python36\lib\site-packages\django\core\management\base.py", line 410, in check

raise SystemCheckError(msg)

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?

System check identified 1 issue (0 silenced).

答案:在settings.py中配置静态文件路径时没有在结尾加逗号

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容