django TemplateDoesNotExist at /blog/list/错误

这个错误让我找了好久,名字也没写错,后来才发现是settings.py拆分出了问题。
TemplateDoesNotExist at /blog/list/
blog/list.html
Request Method: GET
Request URL: http://localhost:8080/blog/list/
Django Version: 3.0.6
Exception Type: TemplateDoesNotExist
Exception Value:
blog/list.html
Exception Location: E:\pyCharmProject\blog\venv\lib\site-packages\django\template\loader.py in get_template, line 19
Python Executable: E:\pyCharmProject\blog\venv\Scripts\python.exe
Python Version: 3.8.1
Python Path:
[‘E:\pyCharmProject\typeidea\untitled’,
‘E:\pyCharmProject\typeidea\untitled’,
‘D:\PyCharm 2019.3.1\plugins\python\helpers\pycharm_display’,
‘C:\Users\19152\AppData\Local\Programs\Python\Python38-32\python38.zip’,
‘C:\Users\19152\AppData\Local\Programs\Python\Python38-32\DLLs’,
‘C:\Users\19152\AppData\Local\Programs\Python\Python38-32\lib’,
‘C:\Users\19152\AppData\Local\Programs\Python\Python38-32’,
‘E:\pyCharmProject\blog\venv’,
‘E:\pyCharmProject\blog\venv\lib\site-packages’,
‘C:\Users\19152\AppData\Local\Programs\Python\Python38-32\lib\site-packages’,
‘C:\Users\19152\AppData\Local\Programs\Python\Python38-32\lib\site-packages\speech-0.5.2-py3.8.egg’,
‘e:\ai\pyaudioanalysis-master’,
‘D:\PyCharm 2019.3.1\plugins\python\helpers\pycharm_matplotlib_backend’]
Server time: Fri, 12 Mar 2021 06:52:47 +0000

出现错误时是因为找不到.html模板,你可以看看访问的路径
django TemplateDoesNotExist at /blog/list/错误_第1张图片
如果你拆分了settings.py文件,那可能是你没有改你拆分完的BASE_DIR,具体解决看我的上一篇文章:
https://blog.csdn.net/qq_45758854/article/details/114696984

你可能感兴趣的:(django开发,博客开发,django,python)