diff --git a/gruppenbildungsspiel.py b/gruppenbildungsspiel.py index bf2a1d6..19da1f3 100644 --- a/gruppenbildungsspiel.py +++ b/gruppenbildungsspiel.py @@ -1,5 +1,7 @@ from flask import Flask, render_template app = Flask(__name__) +app.jinja_env.trim_blocks = True +app.jinja_env.lstrip_blocks = True @app.route('/') def index(): @@ -20,3 +22,8 @@ def admin(): @app.route('/answers') def answers(): return render_template('answers.html', title='Test', text='Hallo, Admin Fooboar') + +@app.route('/solution') +def solution(): + return render_template('solution.html', title='Test', text='Hallo, Lösung!') + diff --git a/templates/base.html b/templates/base.html index 532c6e9..034e30b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,16 +3,17 @@ {{ title }} - - -

{{ text }}

+ + {% block content %} + {% endblock %} diff --git a/templates/index.html b/templates/index.html index 94d9808..16c6d82 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1 +1,10 @@ {% extends "base.html" %} + {% block content %} +
+ +
+ {% endblock %} diff --git a/templates/solution.html b/templates/solution.html new file mode 100644 index 0000000..e2a001c --- /dev/null +++ b/templates/solution.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} + {% block content %} + index + {% endblock %}