@app.route('/input')
"input"がどこにいくか
@app.route('/input')
def move_to_input():
return render_template("input.html")
"input.html"に移動する
他のところに飛んでいく命令
登録ページ
場所
Webデータの送信方法には"POST"と"GET"の2種類ある。
POST:url2文字をつけない
GET:?+クエリ文字
@app.route('/reg', methods=["POST"])
def registration():
with open('./mmcsv.csv','a', newline='', encoding='utf-8') as file:
()内の"a"の部分が重要である
a:ファイルに付け足す時
r:ファイルを開く時
に使用する
return redirect(url_for('index'))