[英]Can't render html page on the templates folder in the django project?
Template doesn't exist error is revoking.模板不存在错误正在撤销。 Firstly django-project is reading html file as django template file but I added "emmet.includeLanguages": {"django-html": "html"}, to settings.json but it doesn't help
首先 django-project 正在读取 html 文件作为 django 模板文件,但我添加了 "emmet.includeLanguages": {"django-html": "html"}, 到 settings.json 但它没有帮助
Try to create or edit your template name to index.htm , then try:尝试创建或编辑您的模板名称为index.htm ,然后尝试:
def home(request) :
.... code here....
return render(request, 'index.html')
Let me know if you get an error.如果您遇到错误,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.