diff --git a/files/classes/clients.py b/files/classes/clients.py index 552d729d07..fb736aa953 100644 --- a/files/classes/clients.py +++ b/files/classes/clients.py @@ -37,7 +37,7 @@ class OauthApp(Base): def permalink(self): return f"/admin/app/{self.id}" @lazy - def idlist(self, page=1, **kwargs): + def idlist(self, page=1): posts = g.db.query(Submission.id).options(lazyload('*')).filter_by(app_id=self.id) @@ -48,7 +48,7 @@ class OauthApp(Base): return [x[0] for x in posts.all()] @lazy - def comments_idlist(self, page=1, **kwargs): + def comments_idlist(self, page=1): posts = g.db.query(Comment.id).options(lazyload('*')).filter_by(app_id=self.id) diff --git a/files/helpers/const.py b/files/helpers/const.py index ef447244a4..06947ce038 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -10,11 +10,11 @@ SLURS = { " Fag":" Cute twink", " FAG":" CUTE TWINK", " pedophile":" libertarian", - " Pedophile":" Libertarian ", - " PEDOPHILE":" LIBERTARIAN ", + " Pedophile":" Libertarian", + " PEDOPHILE":" LIBERTARIAN", " pedo":" libertarian", - " Pedo":" Libertarian ", - " PEDO":" LIBERTARIAN ", + " Pedo":" Libertarian", + " PEDO":" LIBERTARIAN", " kill yourself":" keep yourself safe", " KILL YOURSELF":" KEEP YOURSELF SAFE", " nigger":" 🏀", diff --git a/files/helpers/get.py b/files/helpers/get.py index 33399e758f..3af2ed446b 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -69,7 +69,7 @@ def get_account(id, v=None): return user -def get_post(i, v=None, graceful=False, **kwargs): +def get_post(i, v=None, graceful=False): if v: vt = g.db.query(Vote).options(lazyload('*')).filter_by( @@ -156,7 +156,7 @@ def get_posts(pids, v=None): return sorted(output, key=lambda x: pids.index(x.id)) -def get_comment(i, v=None, graceful=False, **kwargs): +def get_comment(i, v=None, graceful=False): if v: diff --git a/files/helpers/sqla_values.py b/files/helpers/sqla_values.py index fb1745d313..a7bebd3795 100644 --- a/files/helpers/sqla_values.py +++ b/files/helpers/sqla_values.py @@ -5,10 +5,10 @@ from sqlalchemy.sql.expression import FromClause class values(FromClause): named_with_column = True - def __init__(self, columns, *args, **kw): + def __init__(self, columns, *args, **kwargs): self._column_args = columns self.list = args - self.alias_name = self.name = kw.pop('alias_name', None) + self.alias_name = self.name = kwargs.pop('alias_name', None) def _populate_column_collection(self): for c in self._column_args: @@ -16,7 +16,7 @@ class values(FromClause): @compiles(values) -def compile_values(element, compiler, asfrom=False, **kw): +def compile_values(element, compiler, asfrom=False): columns = element.columns v = "VALUES %s" % ", ".join( "(%s)" % ", ".join( diff --git a/files/routes/front.py b/files/routes/front.py index 0eaac57718..a6d60ac931 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -151,7 +151,7 @@ def front_all(v): @cache.memoize(timeout=86400) -def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='', **kwargs): +def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=''): posts = g.db.query(Submission.id).options(lazyload('*')) @@ -255,7 +255,7 @@ def changelog(v): @cache.memoize(timeout=86400) -def changeloglist(v=None, sort="new", page=1 ,t="all", **kwargs): +def changeloglist(v=None, sort="new", page=1 ,t="all"): posts = g.db.query(Submission.id).options(lazyload('*')).filter_by(is_banned=False, private=False,).filter(Submission.deleted_utc == 0) @@ -319,7 +319,7 @@ def random_post(v): return redirect(f"/post/{post.id}") @cache.memoize(timeout=86400) -def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", **kwargs): +def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all"): posts = g.db.query(Submission).options(lazyload('*')) cc_idlist = [x[0] for x in g.db.query(Submission.id).options(lazyload('*')).filter(Submission.club == True).all()] diff --git a/files/routes/static.py b/files/routes/static.py index 4605e6d28d..ddbc5e99f1 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -216,13 +216,13 @@ def api(v): return render_template("api.html", v=v) @app.get("/contact") -@auth_desired +@auth_required def contact(v): return render_template("contact.html", v=v) @app.post("/contact") -@auth_desired +@auth_required def submit_contact(v): message = f'This message has been sent automatically to all admins via https://{site}/contact, user email is "{v.email}"\n\nMessage:\n\n' + request.values.get("message", "") send_admin(v.id, message) diff --git a/files/templates/contact.html b/files/templates/contact.html index 57d41871c5..74e8fa109f 100644 --- a/files/templates/contact.html +++ b/files/templates/contact.html @@ -47,10 +47,6 @@ -{% elif v and v.is_suspended %} - -

Your {{'SITE_NAME' | app_config}} account has been suspended. You are not permitted to use this form.

- {% elif v %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 465d45eb91..e9326df2c2 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -47,15 +47,6 @@ {% include "expanded_image_modal.html" %} {% endif %} -{% if v and v.id==p.author_id %} - {% include "delete_post_modal.html" %} -{% endif %} - -{% if v %} - {% include "report_post_modal.html" %} -{% endif %} - - {% if p.award_count("shit") %} {% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %} @@ -725,4 +716,13 @@ })() + +{% if v and v.id==p.author_id %} + {% include "delete_post_modal.html" %} +{% endif %} + +{% if v %} + {% include "report_post_modal.html" %} +{% endif %} + {% endblock %} \ No newline at end of file diff --git a/snappy.txt b/snappy.txt index 0a4aebf726..349e1c2c96 100644 --- a/snappy.txt +++ b/snappy.txt @@ -1083,6 +1083,7 @@ You also spend quite a lot of time examining and excoriating my initial statemen I can only conclude you're a narcissist and an abuser, because no one else would attempt to twist words to this extent, and write so much to try and dissect each individual sentence. {[para]} He is worse than a Jew, he is—may Allah forgive me for saying this—a SRDine. +{[para]} Side note: it's a function of that testosterone crippled brain that you are so focused on dicks, and your own dick in particular. Guess what? Take estrogen for a while and you will lose focus on that body part to the point where it doesn't even matter anymore. There is so much more to being a woman that genitals, like the depth and complexity of emotions and bonding with others in ways that are literally incomprehensible to you. {[para]} You may like gobbling up the same shit content, that doesn't mean the rest of us need to like your shit sandwich.