From f857e13b3fd5e2e2e901ed842746893cb79025de Mon Sep 17 00:00:00 2001 From: Peter Ludikovsky Date: Wed, 4 May 2016 17:22:16 +0200 Subject: [PATCH] Templates, damit CSS konfigurierbar --- mdlive.py | 2 +- {static => templates}/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename {static => templates}/index.html (92%) diff --git a/mdlive.py b/mdlive.py index 3963cfc..8ec60ca 100755 --- a/mdlive.py +++ b/mdlive.py @@ -8,7 +8,7 @@ app = Flask(__name__, static_url_path='') @app.route("/") def index(): - return app.send_static_file('index.html') + return render_template('index.html') @app.route("/parse", methods=['GET', 'POST']) def parse(): diff --git a/static/index.html b/templates/index.html similarity index 92% rename from static/index.html rename to templates/index.html index 058345f..daa2978 100644 --- a/static/index.html +++ b/templates/index.html @@ -7,7 +7,7 @@ - +
@@ -38,7 +38,7 @@ $(document).ready( idleState = false; idleTimer = setTimeout(function(){ $.ajax({ - url: "http://localhost:5000/parse", + url: "{{ url_for('parse') }}", success: function(result) { $('#output').html(result); },