Make settings usable by logged-out users

This commit is contained in:
Kiril Kovachev 2024-10-16 12:18:15 +01:00
parent 9d3ce85cb4
commit ed1f183a9c
2 changed files with 1 additions and 2 deletions

View File

@ -39,7 +39,6 @@ def create_app(test_config=None):
return redirect("/options")
@app.route("/options", methods=["GET", "POST"])
@login_required
def options():
if request.method == "GET":
return render_template("options.html")

View File

@ -18,12 +18,12 @@
<ul>
{% if g.user %}
<li><span>{{ g.user['username'] }}</span>
<li><a href="{{ url_for('options') }}">{{ localize("options") }}</a>
<li><a href="{{ url_for('auth.logout') }}">{{ localize("log_out") }}</a>
{% else %}
<li><a href="{{ url_for('auth.register') }}">{{ localize("register") }}</a>
<li><a href="{{ url_for('auth.login') }}">{{ localize("log_in") }}</a>
{% endif %}
<li><a href="{{ url_for('options') }}">{{ localize("options") }}</a>
<li><a href="{{ url_for('about_page') }}">{{ localize("about") }}</a></li>
<li><a href="{{ url_for('indices.indices_page') }}">{{ localize("indices") }}</a></li>
<li><a href="{{ url_for('search.search_page') }}">{{ localize("search") }}</a></li>