fix
This commit is contained in:
@@ -99,6 +99,7 @@ class OptionKeys:
|
||||
website_footer = "website_footer"
|
||||
allow_register = "allow_register"
|
||||
submission_list_show_all = "submission_list_show_all"
|
||||
class_list = "class_list"
|
||||
smtp_config = "smtp_config"
|
||||
judge_server_token = "judge_server_token"
|
||||
throttling = "throttling"
|
||||
@@ -112,6 +113,7 @@ class OptionDefaultValue:
|
||||
website_footer = "Online Judge Footer"
|
||||
allow_register = True
|
||||
submission_list_show_all = True
|
||||
class_list = []
|
||||
smtp_config = {}
|
||||
judge_server_token = default_token
|
||||
throttling = {"ip": {"capacity": 100, "fill_rate": 0.1, "default_capacity": 50},
|
||||
@@ -229,6 +231,14 @@ class _SysOptionsMeta(type):
|
||||
def submission_list_show_all(cls, value):
|
||||
cls._set_option(OptionKeys.submission_list_show_all, value)
|
||||
|
||||
@my_property(ttl=DEFAULT_SHORT_TTL)
|
||||
def class_list(cls):
|
||||
return cls._get_option(OptionKeys.class_list)
|
||||
|
||||
@class_list.setter
|
||||
def class_list(cls, value):
|
||||
cls._set_option(OptionKeys.class_list, value)
|
||||
|
||||
@my_property
|
||||
def smtp_config(cls):
|
||||
return cls._get_option(OptionKeys.smtp_config)
|
||||
|
||||
Reference in New Issue
Block a user