2017-10-01 21:16:14 +00:00
|
|
|
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"
|
|
|
|
|
|
|
|
|
2017-08-15 12:32:14 +00:00
|
|
|
class CacheKey:
|
|
|
|
waiting_queue = "waiting_queue"
|
2017-10-16 01:45:29 +00:00
|
|
|
contest_rank_cache = "contest_rank_cache"
|
2017-09-22 08:41:29 +00:00
|
|
|
website_config = "website_config"
|
2017-10-01 19:54:34 +00:00
|
|
|
option = "option"
|
2018-01-07 06:37:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Difficulty(Choices):
|
|
|
|
LOW = "Low"
|
|
|
|
MID = "Mid"
|
|
|
|
HIGH = "High"
|