aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-06-24 00:23:54 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2023-06-24 00:23:54 +0200
commit92d9cad6cbb330055fe93e9c104ad8eba8d46662 (patch)
treeed2dde5e9b63e3f59efd04ac3957c3b759697597
parentchg: [dependencies] Updated Python dependencies. (diff)
downloadnewspipe-92d9cad6cbb330055fe93e9c104ad8eba8d46662.tar.gz
newspipe-92d9cad6cbb330055fe93e9c104ad8eba8d46662.tar.bz2
newspipe-92d9cad6cbb330055fe93e9c104ad8eba8d46662.zip
Applied patch from "B. Stack" <bgstack15@gmail.com>
-rw-r--r--newspipe/templates/login.html2
-rw-r--r--newspipe/web/views/session_mgmt.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/newspipe/templates/login.html b/newspipe/templates/login.html
index 5d936d18..b9952309 100644
--- a/newspipe/templates/login.html
+++ b/newspipe/templates/login.html
@@ -19,7 +19,7 @@
<div class="alert alert-warning" role="alert">{{ message }}</div>
{% endfor %}
{{ form.submit(class_="btn btn-primary") }}
- <a href="/signup" class="btn btn-info">{{ _('Sign up') }}</a>
+ {% if self_registration %}<a href="/signup" class="btn btn-info">{{ _('Sign up') }}</a>{% endif %}
</form>
</div>
</div>
diff --git a/newspipe/web/views/session_mgmt.py b/newspipe/web/views/session_mgmt.py
index 0e8329e5..0154503a 100644
--- a/newspipe/web/views/session_mgmt.py
+++ b/newspipe/web/views/session_mgmt.py
@@ -84,7 +84,7 @@ def login():
if request.method == "POST" and form.validate(): # fixes an issue in flask-wtf
login_user_bundle(form.user)
return form.redirect("home")
- return render_template("login.html", form=form)
+ return render_template("login.html", form=form, self_registration=application.config["SELF_REGISTRATION"])
@current_app.route("/logout")
bgstack15