Flask 使用过程

被route()装饰器所装饰的functions()必须有返回值

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    'Hello World!'                    # 没有关键字return

if __name__ == '__main__':
    app.run()
TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.

为什么要构建URL

pass

from werkzeug import secure_filename 报错

from werkzeug.utils import secure_filename
原文地址:https://www.cnblogs.com/daemonFlY/p/11081183.html