diff --git a/nateman/blueprints/__init__.py b/nateman/blueprints/__init__.py index 37f7f47..cc786d7 100644 --- a/nateman/blueprints/__init__.py +++ b/nateman/blueprints/__init__.py @@ -19,15 +19,12 @@ Index-Blueprint """ -from flask import Blueprint, g, redirect, url_for, render_template +from flask import Blueprint, render_template bp = Blueprint("index", __name__) @bp.route("/") def index(): - """ Startseite (Pfad ``/``, leitet bei angemeldetem Lehrer auf Klausurseite um) """ - if g.lehrer is not None: - return redirect(url_for("klausuren.mine"), code=303) - else: - return render_template("index/index.html.j2") + """ Startseite (Pfad ``/``) """ + return render_template("index/index.html.j2") diff --git a/nateman/templates/base.html.j2 b/nateman/templates/base.html.j2 index 5898d07..b50c198 100644 --- a/nateman/templates/base.html.j2 +++ b/nateman/templates/base.html.j2 @@ -54,7 +54,7 @@
- + diff --git a/nateman/templates/index/index.html.j2 b/nateman/templates/index/index.html.j2 index 5ae6d74..dd80bbf 100644 --- a/nateman/templates/index/index.html.j2 +++ b/nateman/templates/index/index.html.j2 @@ -30,6 +30,9 @@ {%- if not loop.first -%}{%- if loop.last %} und {% else -%}, {% endif -%}{%- endif -%} {{ stufe.name }} {%- endfor %} - einsehen oder sich als Lehrer anmelden. + einsehen + {%- if g.lehrer is none %} + oder sich als Lehrer anmelden + {%- endif -%}.

{% endblock %}