flask パラメータとルーティング

1
2
3
4
5
6
7
8
9
10
11
from flask import Flask, render_template
 
app = Flask(__name__)
 
@app.route('/hello/<name>')
def hello(name=None):
 
    return render_template('hello.html', title='flask test', name=name)
 
if __name__ == "__main__":
    app.run(debug=True, host='192.168.56.10', port=8000)