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") return redirect("/options")
@app.route("/options", methods=["GET", "POST"]) @app.route("/options", methods=["GET", "POST"])
@login_required
def options(): def options():
if request.method == "GET": if request.method == "GET":
return render_template("options.html") return render_template("options.html")

View File

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