TemplateDoesNotExist at /
index.html
Request Method: GET
Request URL:
Django Version: 1.6.5
Exception Type: TemplateDoesNotExist
Exception Value:
index.html
Exception Location: C:\Python27\lib\site-packages\django\template\loader.py in find_template, line 131
Template-loader postmortem
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
C:\Users\Peter Na\documents\github\tutorial2\static\templates\index.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
C:\Python27\lib\site-packages\django\contrib\admin\templates\index.html (File does not exist)
C:\Python27\lib\site-packages\django\contrib\auth\templates\index.html (File does not exist)
TemplateDoesNotExist at /
index.html
Request Method: GET
Request URL:
Django Version: 1.6.5
Exception Type: TemplateDoesNotExist
Exception Value:
index.html
Exception Location: C:\Python27\lib\site-packages\django\template\loader.py in find_template, line 131
Python Executable: C:\Python27\python.exe
Python Version: 2.7.6
Template-loader postmortem
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
C:\Users\Peter Na\documents\github\tutorial2\static\templates\index.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
C:\Python27\lib\site-packages\django\contrib\admin\templates\index.html (File does not exist)
C:\Python27\lib\site-packages\django\contrib\auth\templates\index.html (File does not exist)
在根文件夹中,我有一个静态文件夹>;Templates>;索引.html. 好像它不能提取HTML文件???在
您需要在设置文件中添加模板目录。在
我这样做我的项目。我使用的是Djnago 1.6
相关问题 更多 >
编程相关推荐