From f22ab1f26768772437d01eb507b798c56696540d Mon Sep 17 00:00:00 2001 From: zachglassman Date: Thu, 28 Dec 2017 14:57:46 -0800 Subject: [PATCH] add about endpoint and template This adds a second endpoint for an about page which illustrates how to add another endpoint while suggesting an about page. Also add a template for about. --- app.py | 4 ++++ templates/about.html | 30 ++++++++++++++++++++++++++++++ templates/index.html | 1 + 3 files changed, 35 insertions(+) create mode 100644 templates/about.html diff --git a/app.py b/app.py index 374ec7343..6d2c93b11 100644 --- a/app.py +++ b/app.py @@ -6,5 +6,9 @@ def index(): return render_template('index.html') +@app.route('/about') +def about(): + return render_template('about.html') + if __name__ == '__main__': app.run(port=33507) diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 000000000..bd69788a7 --- /dev/null +++ b/templates/about.html @@ -0,0 +1,30 @@ + + + + + + + + + + Wilkommen, bienvenue, and welcome to Heroku! + + + + + +
+
+
+

About

+

Home

+
+
+
+ + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index b980e0f77..42834d071 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,6 +18,7 @@

Hello, World!