From 65737298258bc7b3021becfc73ac7ad971d456d4 Mon Sep 17 00:00:00 2001 From: asauer Date: Thu, 11 Apr 2019 14:53:14 +0200 Subject: [PATCH] Add content to result page --- gruppenbildungsspiel.py | 4 ++-- templates/result.html | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gruppenbildungsspiel.py b/gruppenbildungsspiel.py index 19da1f3..0374d09 100644 --- a/gruppenbildungsspiel.py +++ b/gruppenbildungsspiel.py @@ -13,7 +13,7 @@ def form(): @app.route('/result') def result(): - return render_template('result.html', title='Test', text='Hallo, Fooboar') + return render_template('result.html', hausname='Knuth', haustext='Mitglieder dieses Hauses mögen LaTeX-Anzüge und Eisbären.', id=123) @app.route('/admin') def admin(): @@ -25,5 +25,5 @@ def answers(): @app.route('/solution') def solution(): - return render_template('solution.html', title='Test', text='Hallo, Lösung!') + return render_template('solution.html', title='Test', text='Hallo, Lösung') diff --git a/templates/result.html b/templates/result.html index 94d9808..d060433 100644 --- a/templates/result.html +++ b/templates/result.html @@ -1 +1,9 @@ {% extends "base.html" %} +{% block content %} +

Dein Ergebnis

+

Herzlichen Glückwunsch, du bist in Haus

+ {{ hausname }} +

{{ haustext }}

+

Deine Id, mit der du deine Antworten unter dem Reiter "Meine Antworten" später wieder abrufen kannst, lautet: + {{ id }}

+{% endblock %}