上午写了一下Django的程序:遇到一个bug,bug是不大,但是比较恶心,看网上的相关文档也是不对的;自己又开始琢磨了;

直接上图吧!

django.template.exceptions.TemplateDoesNotExist: first.html

这是给我报的bug 当时还挺无解,之前也没有遇到过这个bug,查了一下应该会死setting文件的错误 ,又重新设置的了一遍:

如图:

django.template.exceptions.TemplateDoesNotExist: first.html

加了一句这个之后还是报了刚才那个错误:

但是想的setting应该没有错误了 ,看了一个帖子说的是templates 文件夹要和项目以及app同级别 ,我一看我的templates 文件夹在APP文件夹里面,于是果断吧templates 拉出来,

django.template.exceptions.TemplateDoesNotExist: first.html

运行一下 程序成功了!!!!

相关文章:

  • 2021-06-16
  • 2022-12-23
猜你喜欢
  • 2022-01-16
  • 2021-05-15
  • 2021-06-02
  • 2021-09-13
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
相关资源
相似解决方案