报错信息如下
The view function did not return a valid response. The function either returned None or ended without a return statement
源码如下
if .............:
return None
在国内一直搜不到结果,后面发现原因是 flask 不喜欢隐式返回,最好是 return function 或者 string。
参考资料:https://stackoverflow.com/questions/25034123/flask-value-error-view-function-did-not-return-a-response