ボタンで遷移だけしたい。
If you press the button in "AAAA.html" with flask, it will transition to "BBBB.html".
Part of the contents of flask python
sample.py
from flask import Flask, request, render_template
app = Flask(__name__)
(Omission)
@app.route("/BBBB", methods=["POST"])
def move_BBBB():
return render_template("BBBB.html")
(Omission)
Make sure to transition to BBBB.html when POST arrives.
templates/AAAA.html
{% block content %}
<form action="/BBBB" method="POST">
<input type="submit" value="button">
</form>
{% endblock %}
Write the button in AAAA.html. Also prepare BBBB.html.
It seems that it is made with this, but I feel that something is wrong.
Recommended Posts