2022-09-27
问题描述:
编写Django代码时,设置了一个"static"文件夹,在里面放置了一张图片。在"setting"中设置了静态文件在服务器中的存储路径,But 浏览器运行时,显示
找不到,就很奇怪。
问题原因:
之后,我查看了代码,发现了一个由拼写错误引起的问题,如下所示
[En]
After that, I took a look at the code and found a problem, which was caused by a spelling error, as follows
发现这个存储位置的拼写少了一个"s"。
其中,在"模板(templates)"的setting中,就发现位置是"DIRS:",如下: