完全按照操作,404报错

来源:6-1 首页和登录页面的配置

永不止息L

2018-04-13

TemplateDoesNotExist at /

index.html

Request Method:

GET    


    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)

django.template.exceptions.TemplateDoesNotExist: index.html


写回答

1回答

永不止息L

提问者

2018-04-13

修改setting.py文件

TEMPLATES = [
   {
       'BACKEND': 'django.template.backends.django.DjangoTemplates',
       'DIRS': [os.path.join(BASE_DIR, "templates")],       # 添加os.path.join(BASE_DIR, "templates")后解决


0
3
bobby
回复
慕无忌9233038
你的报错是什么 截图我看看呢
2018-06-01
共3条回复

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4041 问题

查看课程