浏览器访问url 状态码 500
以下代码仅仅针对简单的return 返回数据
函数代码
@app.route('/')
def f_root(): # 服务器不编写任何函数就返回500服务器错误
pass # return -a页报错
flask的函数必须返回个参数,而且必须是string, dict, tuple
dict的键默认为了会转化为字符串
tuple 有要求
The tuple must have the form (body, status, headers), (body, status), or (body, headers).
总结:响应类型给字典或者字符串就没错