flask
文章平均质量分 61
weixin_45389821
正在学习python中,欢迎大家来一起讨论,无论我是否学过,一起学习进步!谢谢
展开
-
jinja2.exceptions.TemplateNotFound: test.html
flask自定义templates与static路径flask自定义templatesflask自定义templates创建app时,修改参数,template_folder=r’d:\test\html_file’原创 2021-03-04 10:47:45 · 1384 阅读 · 2 评论 -
werkzeug.exceptions.BadRequestKeyError: 400
@[TOC](werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.KeyError: ‘username’)现象werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a requ原创 2020-11-06 16:39:38 · 6257 阅读 · 2 评论 -
TypeError: argument of type ‘module‘ is not iterable
TypeError: argument of type 'module' is not iterable现象原因解决方法现象在运行过程中报错:if ‘username’ in sessions:TypeError: argument of type ‘module’ is not iterable原因由于我使用的PyCharm,在调用模块的时候,会自动提示模块,于是没注意多在session模块后面加了个s,所以会报这个错误。解决方法调用模块sessions改为session.唉,大意了!找原创 2020-11-06 16:34:21 · 1567 阅读 · 0 评论 -
jinja2.exceptions.TemplateNotFound: index.html
jinja2.exceptions.TemplateNotFound: index.html现象原因解决方法在学习Flask中出现的报错,一起踩坑吧!现象GET /index HTTP/1.1" 500 内部服务器错误return render_template(“index.html”) #调用模块indexjinja2.exceptions.TemplateNotFound: index.html没有找到index.html文件原因由于reder_template查找目录是在当前目原创 2020-11-06 16:28:42 · 4092 阅读 · 1 评论