1templates创建在项目根目录中
2.报错" django.template.exceptions.TemplateDoesNotExist: index.html"
在setting.py的TEMPLATES‘DIRS'[]加入模版路径
'DIRS': [os.path.join(BASE_DIR,'templates')],
2.报错" django.template.exceptions.TemplateDoesNotExist: index.html"
在setting.py的TEMPLATES‘DIRS'[]加入模版路径
'DIRS': [os.path.join(BASE_DIR,'templates')],
2017-07-16
context must be a dict rather than set关于这个问题的解答:return render(request,'article_detail.html',{'article',article}) 注意使用dict返回中间是冒号不是逗号
2017-07-15