diff --git a/server/src/data/app.py b/server/src/data/app.py index 423ab0b..64647f8 100644 --- a/server/src/data/app.py +++ b/server/src/data/app.py @@ -2,12 +2,13 @@ from flask import Flask, render_template, request, redirect app = Flask(__name__) +items = ['dummy1', 'dummy2', 'a', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'] @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', items=items) @app.route('/submit', methods =['POST']) def submit(): value = request.form.get("query") + items.append(query) print(value) return redirect(url_for("mainpage")) \ No newline at end of file diff --git a/server/src/data/templates/index.html b/server/src/data/templates/index.html index 67b4af2..cdb346b 100644 --- a/server/src/data/templates/index.html +++ b/server/src/data/templates/index.html @@ -3,13 +3,14 @@