From 81441e5c3e7a4afca7b246a86e426069be4f9e16 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Fri, 23 Jul 2021 22:02:47 +0200 Subject: [PATCH 1/3] sneed --- drama/routes/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drama/routes/users.py b/drama/routes/users.py index a10220247..62bb78997 100644 --- a/drama/routes/users.py +++ b/drama/routes/users.py @@ -216,7 +216,7 @@ def followers(username, v): @auth_required def visitors(v): if v.admin_level < 1 and not v.patron: return render_template("errors/patron.html", v=v) - viewers=sorted(v.viewers, key = lambda x: x.last_view_utc) + viewers=sorted(v.viewers, key = lambda x: x.last_view_utc, reverse=True) return render_template("viewers.html", v=v, viewers=viewers) @app.route("/@", methods=["GET"]) From 8daf6b27927fbd0f981f40072a427e75b7e53042 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Fri, 23 Jul 2021 22:04:33 +0200 Subject: [PATCH 2/3] sneed --- drama/templates/userpage.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drama/templates/userpage.html b/drama/templates/userpage.html index f2ff31dfb..1a4200fe8 100644 --- a/drama/templates/userpage.html +++ b/drama/templates/userpage.html @@ -305,7 +305,7 @@ {% if v and v.id == u.id %} Edit profile - Profile views + Profile views {% endif %} {% if v and v.id != u.id %} Unfollow From f7697a0c887b388d73812dd4bfb8dbf96589a484 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Fri, 23 Jul 2021 22:16:41 +0200 Subject: [PATCH 3/3] sneed --- drama/routes/errors.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drama/routes/errors.py b/drama/routes/errors.py index 4f9a477f6..dc9452eb6 100644 --- a/drama/routes/errors.py +++ b/drama/routes/errors.py @@ -1,3 +1,5 @@ +import jinja2.exceptions + from drama.helpers.wrappers import * from drama.helpers.session import * from drama.classes.custom_errors import * @@ -195,10 +197,12 @@ def allow_nsfl_logged_out(bid, v): return redirect(request.form.get("redir")) -@app.route("/error/", methods=["GET"]) +@app.route("/error/", methods=["GET"]) @auth_desired -def error_all_preview(eid, v): +def error_all_preview(error, v): - eid=int(eid) - return render_template(f"errors/{eid}.html", v=v) + try: + return render_template(f"errors/{error}.html", v=v) + except jinja2.exceptions.TemplateNotFound: + abort(400)