diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-07-09 08:46:33 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-07-09 08:46:33 +0000 |
commit | 04f63687b84f26e4459b28a54b4bee680bc2206c (patch) | |
tree | 83ff5ae11d9f481c3ff9770e3ede61b023f91c87 /wk9 | |
parent | 1bea8d8d63dd911fb5effa303522cd7db82f3d76 (diff) |
Tue, Jul 9, 2024, 1:46 AM -07:00
Diffstat (limited to 'wk9')
-rw-r--r-- | wk9/lect/hello/app.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |