diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-07-09 08:49:01 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-07-09 08:49:01 +0000 |
commit | 37a731b6ebaab06b2ccd192c8847f86fcd951b01 (patch) | |
tree | 43f2cbb71f38cd441e27aaeccb2c39762cfa5c28 /wk9/lect/hello/app.py | |
parent | 04f63687b84f26e4459b28a54b4bee680bc2206c (diff) |
Tue, Jul 9, 2024, 1:49 AM -07:00
Diffstat (limited to 'wk9/lect/hello/app.py')
-rw-r--r-- | wk9/lect/hello/app.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/wk9/lect/hello/app.py b/wk9/lect/hello/app.py index 0ca93b3..1368586 100644 --- a/wk9/lect/hello/app.py +++ b/wk9/lect/hello/app.py @@ -4,8 +4,5 @@ app = Flask(__name__) @app.route("/") def index(): - if "name" in request.args: - name = request.args["name"] - else: - name = "world" - return render_template("index.html", placeholder=name) + name = request.args.get("name", "world") + return render_template("index.html", name=name) |