提交 9d867b2e 编写于 作者: 鞋子不会飞's avatar 鞋子不会飞

使用render_template方法渲染模板并返回

上级 f60856bf
......@@ -32,6 +32,7 @@ def upload_file():
f.save('./demo.png')
return 'ok'
#####################################如何在不同的场景里返回不同的响应信息##########################################
# 1)返回模板
# 使用render_template方法渲染模板并返回
......@@ -42,5 +43,3 @@ def index001():
mstr = 'Hello 黑马程序员'
mint = 10
return render_template('index.html', my_str=mstr, my_int=mint)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册