diff --git a/app/routes/forum/topic.py b/app/routes/forum/topic.py index 324015f..6a3f2e3 100644 --- a/app/routes/forum/topic.py +++ b/app/routes/forum/topic.py @@ -72,7 +72,7 @@ def forum_topic(f, page): comments = t.thread.comments.paginate(page, Thread.COMMENTS_PER_PAGE, True) - now_minus = datetime.datetime.now() - datetime.timedelta(minutes=1) + now_minus = datetime.datetime.now() - datetime.timedelta(days=V5Config.NECROPOST_LIMIT) last_updated_comment = t.thread.comments.filter(Comment.date_modified <= now_minus).first() return render('/forum/topic.html', t=t, form=form, comments=comments, last=last_updated_comment) diff --git a/config.py b/config.py index 4248053..7110ba9 100644 --- a/config.py +++ b/config.py @@ -4,6 +4,7 @@ try: from local_config import LocalConfig except ImportError: print(" \033[92mWARNING: Local config not found\033[0m") + class LocalConfig(): pass @@ -25,6 +26,7 @@ class Config(object): # Do not attach cookies to cross-origin requests SESSION_COOKIE_SAMESITE = "Lax" + class DefaultConfig(object): """Every value here can be overrided in the local_config.py class""" # Domain @@ -50,6 +52,9 @@ class DefaultConfig(object): # GLaDOS configuration GLADOS_HOST = "127.0.0.1" GLADOS_PORT = 5555 + # Time in days before trigerring the nec + NECROPOST_LIMIT = 31 + class V5Config(LocalConfig, DefaultConfig): # Values put here cannot be overidden with local_config