#4 request args.get 可以設置默認值,甚至直接支持中文。
from flask import Flask, request
app= Flask(__name__)
@app.route("/hello")
def hello():
name = request.args.get('name', 'Flask')
return '<h1>Hello, %s!</h1>' % name
app.run()
show me the result.
#4 request args.get 可以設置默認值,甚至直接支持中文。
from flask import Flask, request
app= Flask(__name__)
@app.route("/hello")
def hello():
name = request.args.get('name', 'Flask')
return '<h1>Hello, %s!</h1>' % name
app.run()
show me the result.
一、幾個基本概念 登錄用戶(login user):通過登錄方式進入系統的用戶,強調登錄身份。 當前用戶(current user):執行一個進程或者命令時所使用的用戶身份,強調執行身份。 舉