leaderboard refactor (#526)

This commit is contained in:
justcool393 2023-02-24 04:31:17 -08:00 committed by GitHub
parent 22ad4f5d23
commit 44919507e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 436 additions and 600 deletions

View file

@ -1,11 +1,13 @@
from os import environ, listdir
import re
from copy import deepcopy
from json import loads
from os import environ
from typing import Final
from flask import request
from files.__main__ import db_session
from files.classes.sub import Sub
from files.classes.marsey import Marsey
from flask import request
SITE = environ.get("DOMAIN", '').strip()
SITE_ID = environ.get("SITE_ID", '').strip()
@ -33,6 +35,8 @@ BUG_THREAD = 0
WELCOME_MSG = f"Welcome to {SITE_TITLE}! Please read [the rules](/rules) first. Then [read some of our current conversations](/) and feel free to comment or post!\n\nWe encourage people to comment even if they aren't sure they fit in; as long as your comment follows [community rules](/rules), we are happy to have posters from all backgrounds, education levels, and specialties."
ROLES={}
LEADERBOARD_LIMIT: Final[int] = 25
THEMES = {"TheMotte", "dramblr", "reddit", "transparent", "win98", "dark",
"light", "coffee", "tron", "4chan", "midnight"}
SORTS_COMMON = {
@ -99,6 +103,7 @@ FEATURES = {
PERMS = {
"DEBUG_LOGIN_TO_OTHERS": 3,
"USER_SHADOWBAN": 2,
}
AWARDS = {}