本文整理汇总了Python中DataModel.recalculate_scoring方法的典型用法代码示例。如果您正苦于以下问题:Python DataModel.recalculate_scoring方法的具体用法?Python DataModel.recalculate_scoring怎么用?Python DataModel.recalculate_scoring使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataModel
的用法示例。
在下文中一共展示了DataModel.recalculate_scoring方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: process_attr_def_form
# 需要导入模块: import DataModel [as 别名]
# 或者: from DataModel import recalculate_scoring [as 别名]
def process_attr_def_form(global_config, form):
global_config['logger'].debug( 'Process Attribute Definitions Form' )
attrdef_filename = WebCommonUtils.get_attrdef_filename(global_config['this_competition'])
if attrdef_filename is not None:
attr_definitions = AttributeDefinitions.AttrDefinitions(global_config)
attr_definitions.parse(attrdef_filename)
attr_dict = attr_definitions.get_definitions()
for key, attr_def in sorted(attr_dict.items()):
attr_def['Weight'] = form[key].value
attr_definitions.write_attr_overrides();
competition = global_config['this_competition'] + global_config['this_season']
if competition == None:
raise Exception( 'Competition Not Specified!')
DataModel.recalculate_scoring(global_config, competition, attr_definitions)
示例2: process_attr_def_form
# 需要导入模块: import DataModel [as 别名]
# 或者: from DataModel import recalculate_scoring [as 别名]
def process_attr_def_form(global_config, form):
global_config['logger'].debug( 'Process Attribute Definitions Form' )
if global_config['attr_definitions'] == None:
print 'No Attribute Definitions, Skipping Process Files'
else:
attrdef_filename = './config/' + global_config['attr_definitions']
if os.path.exists(attrdef_filename):
attr_definitions = AttributeDefinitions.AttrDefinitions(global_config)
attr_definitions.parse(attrdef_filename)
attr_dict = attr_definitions.get_definitions()
for key, attr_def in sorted(attr_dict.items()):
attr_def['Weight'] = form[key].value
attr_definitions.write_attr_overrides();
competition = global_config['this_competition'] + global_config['this_season']
if competition == None:
raise Exception( 'Competition Not Specified!')
DataModel.recalculate_scoring(global_config, competition, attr_definitions)
示例3: GET
# 需要导入模块: import DataModel [as 别名]
# 或者: from DataModel import recalculate_scoring [as 别名]
def GET(self, event_code):
WebLogin.check_access(global_config,4)
comp = WebCommonUtils.map_event_code_to_comp(event_code)
DataModel.recalculate_scoring(global_config, comp)
raise web.seeother('/event/%s' % event_code)