diff --git a/app.py b/app.py index 73d40cc..e7aa139 100644 --- a/app.py +++ b/app.py @@ -53,7 +53,7 @@ def index(): term.c += ' + ' if random.randint(0,1) else ' - ' term.c += str(random.randint(1,maxValue)) zufall.append(term) - return render_template('arbeitsblatt.html',aufgaben=zufall) + return render_template('arbeitsblatt.html',aufgaben=zufall,maxPerPage=int(request.form.get('maxPerPage'))) else: return render_template('generator.html', reihen=rt_rechenreihen) diff --git a/templates/arbeitsblatt.html b/templates/arbeitsblatt.html index f0e89b9..e559516 100644 --- a/templates/arbeitsblatt.html +++ b/templates/arbeitsblatt.html @@ -4,7 +4,7 @@
{% for a in aufgaben %}
{{ a.a }} {% if a.t.typ == '*' %}·{% elif a.t.typ == '/'%}:{% else %}{{ a.t.typ }}{% endif %} {{ a.b }}{{ a.c }} =
- {% if (loop.index % 60 == 0) and (not loop.last) %} + {% if (loop.index % maxPerPage == 0) and (not loop.last) %}
{% endif %} diff --git a/templates/generator.html b/templates/generator.html index a4b6b90..01638d3 100644 --- a/templates/generator.html +++ b/templates/generator.html @@ -29,10 +29,11 @@ + + +
+ +