From 73e9320e99457fdd4d0a58a4e9be02595b4e77ea Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 28 Oct 2018 22:23:45 +0100 Subject: [PATCH] Render hello-world using a html template --- slider.py | 4 ++-- templates/hello.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 templates/hello.html diff --git a/slider.py b/slider.py index 1e23d2f..f9a15bc 100755 --- a/slider.py +++ b/slider.py @@ -1,12 +1,12 @@ #!/usr/bin/python3 -from flask import Flask +from flask import Flask, render_template app = Flask(__name__) @app.route("/") def hello(): - return "Hello slider" + return render_template("hello.html") if __name__ == "__main__": app.run() diff --git a/templates/hello.html b/templates/hello.html new file mode 100644 index 0000000..d8a4ccc --- /dev/null +++ b/templates/hello.html @@ -0,0 +1 @@ +Hello Slider!