From 02f3a7842abba520e4fba1b3710285e748703092 Mon Sep 17 00:00:00 2001 From: Patrick Sulzle Date: Wed, 6 Apr 2022 14:54:01 +0200 Subject: [PATCH] logic for list and argument passing is working --- frontend/groclist.py | 4 +++- frontend/templates/list.html | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/groclist.py b/frontend/groclist.py index f4815dd..ef8ffd3 100644 --- a/frontend/groclist.py +++ b/frontend/groclist.py @@ -36,7 +36,9 @@ def login(): @app.route("/list/", methods=['GET']) def list(id): - return render_template("list.html", id=id) + get_user_record = db.user_info.find_one({"uuid": id},{"name": 1}) + full_name = get_user_record["name"] + return render_template("list.html", full_name=full_name, id=id) @app.errorhandler(404) def not_found(error): diff --git a/frontend/templates/list.html b/frontend/templates/list.html index eb99e7e..87516ab 100644 --- a/frontend/templates/list.html +++ b/frontend/templates/list.html @@ -8,9 +8,9 @@

Welcome to GrocList


- Hello {{ id }} -

Click List to view shopping list

-

Click here to go home.

+ Hello {{ full_name }} +

Click List to view shopping list

+

Click here to logout.