add: endpoint

This commit is contained in:
2026-02-19 15:03:08 +00:00
parent bfc2ac286d
commit e8ea43124a
4 changed files with 46 additions and 33 deletions

View File

@@ -1,8 +1,13 @@
from flask import Flask, render_template
from flask import Flask, render_template, request, redirect
app = Flask(__name__)
@app.route("/")
def mainpage():
items = ['dummy1', 'dummy2', 'a', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa']
return render_template('index.html', title='BG Shutdown')
return render_template('index.html', title='BG Shutdown')
@app.route('/submit', methods =['POST'])
def submit():
value = request.form.get("query")
print(value)
return redirect(url_for("mainpage"))