Python Django 的 django templatedoesnotexist

时间:2023-03-09 04:08:52
Python Django 的 django templatedoesnotexist

django 1.8版本的解决方案

在  setting.py 这个文件里

TEMPLATES = [

        ......

#原来的

         #'DIRS': [ ], //  这个 列表里添加 template路径

         #修改后

'DIRS':[ os.path.join(os.path.dirname(__file__),'templates').replace('\\','/') ],

]

然后 Python manager.py runserver

刷新页面就好了