当前位置: 首页>>代码示例>>Python>>正文


Python DataModel.recalculate_scoring方法代码示例

本文整理汇总了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)
开发者ID:FRCTeam1073-TheForceTeam,项目名称:ScoutingAppCentral,代码行数:20,代码来源:WebAttributeDefinitions.py

示例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)
开发者ID:,项目名称:,代码行数:23,代码来源:

示例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)
开发者ID:mbhoude,项目名称:ScoutingAppCentral,代码行数:8,代码来源:ScoutingAppMainWebServer.py


注:本文中的DataModel.recalculate_scoring方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。