diff options
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) |