mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
37 lines
695 B
Python
37 lines
695 B
Python
class Choices:
|
|
@classmethod
|
|
def choices(cls):
|
|
d = cls.__dict__
|
|
return [d[item] for item in d.keys() if not item.startswith("__")]
|
|
|
|
|
|
class ContestType:
|
|
PUBLIC_CONTEST = "Public"
|
|
PASSWORD_PROTECTED_CONTEST = "Password Protected"
|
|
|
|
|
|
class ContestStatus:
|
|
CONTEST_NOT_START = "1"
|
|
CONTEST_ENDED = "-1"
|
|
CONTEST_UNDERWAY = "0"
|
|
|
|
|
|
class ContestRuleType(Choices):
|
|
ACM = "ACM"
|
|
OI = "OI"
|
|
|
|
|
|
class CacheKey:
|
|
waiting_queue = "waiting_queue"
|
|
contest_rank_cache = "contest_rank_cache"
|
|
website_config = "website_config"
|
|
|
|
|
|
class Difficulty(Choices):
|
|
LOW = "Low"
|
|
MID = "Mid"
|
|
HIGH = "High"
|
|
|
|
|
|
CONTEST_PASSWORD_SESSION_KEY = "contest_password"
|