From 04f63687b84f26e4459b28a54b4bee680bc2206c Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:46:33 +0000 Subject: Tue, Jul 9, 2024, 1:46 AM -07:00 --- wk9/lect/hello/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'wk9/lect/hello') diff --git a/wk9/lect/hello/app.py b/wk9/lect/hello/app.py index 7898011..0ca93b3 100644 --- a/wk9/lect/hello/app.py +++ b/wk9/lect/hello/app.py @@ -4,5 +4,8 @@ app = Flask(__name__) @app.route("/") def index(): - name = request.args["name"] + if "name" in request.args: + name = request.args["name"] + else: + name = "world" return render_template("index.html", placeholder=name) -- cgit v1.2.3