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