From d44cd7029c40c2e07c55e3e5ee05b926980fac9c Mon Sep 17 00:00:00 2001 From: tmeissner Date: Sun, 7 Oct 2018 23:05:08 +0200 Subject: [PATCH] Chapter 2: Dynamic routes (2b) --- hello.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hello.py b/hello.py index 5c777ff..06f1145 100644 --- a/hello.py +++ b/hello.py @@ -1,6 +1,12 @@ from flask import Flask app = Flask(__name__) + @app.route('/') def index(): return '

Hello World!

' + + +@app.route('/user/') +def user(name): + return '

Hello, {}!

'.format(name)