From e25dbda617371fcfd5f0214d657ff549f1f54441 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 8 Feb 2022 20:58:52 +0200 Subject: [PATCH] vxc --- files/__main__.py | 1 + files/routes/front.py | 4 +++- files/templates/submit.html | 5 +---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index c5c967b75..81ff55dd8 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -55,6 +55,7 @@ app.config["READ_ONLY"]=bool(int(environ.get("READ_ONLY", "0"))) app.config["BOT_DISABLE"]=bool(int(environ.get("BOT_DISABLE", False))) app.config["CACHE_TYPE"] = "RedisCache" app.config["CACHE_REDIS_URL"] = environ.get("REDIS_URL", "redis://localhost") +app.config["CACHE_KEY_PREFIX"] = app.config["SITE_NAME"] app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True diff --git a/files/routes/front.py b/files/routes/front.py index 38feab2ba..1829b5efd 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -174,7 +174,7 @@ def front_all(v, sub=None): filter_words=v.filter_words if v else [], gt=gt, lt=lt, - sub=sub, + sub=sub ) posts = get_posts(ids, v=v) @@ -266,6 +266,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" posts = g.db.query(Submission) if sub: posts = posts.filter_by(sub=sub.name) + elif SITE_NAME == '2Much4You': posts = posts.filter(Submission.sub != None) + else: posts = posts.filter_by(sub=None) if gt: posts = posts.filter(Submission.created_utc > gt) if lt: posts = posts.filter(Submission.created_utc < lt) diff --git a/files/templates/submit.html b/files/templates/submit.html index f089b75b3..3b9da5be1 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -79,14 +79,11 @@ - {% if SUBS %} + {% if SITE_NAME=='2Much4You' %}