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


Python DatabaseManager.retrieve_performance_chain方法代码示例

本文整理汇总了Python中database.DatabaseManager.retrieve_performance_chain方法的典型用法代码示例。如果您正苦于以下问题:Python DatabaseManager.retrieve_performance_chain方法的具体用法?Python DatabaseManager.retrieve_performance_chain怎么用?Python DatabaseManager.retrieve_performance_chain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在database.DatabaseManager的用法示例。


在下文中一共展示了DatabaseManager.retrieve_performance_chain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: citation_page

# 需要导入模块: from database import DatabaseManager [as 别名]
# 或者: from database.DatabaseManager import retrieve_performance_chain [as 别名]
def citation_page(uuid):
    game_ref = dbm.retrieve_game_ref(uuid)
    perf_ref = dbm.retrieve_perf_ref(uuid)
    derived_performances = dbm.retrieve_derived_performances(uuid)
    previous_performances = dbm.retrieve_performance_chain(uuid)[:-1]
    save_states = dbm.retrieve_save_state(game_uuid=uuid)
    extra_files = dbm.retrieve_file_path(game_uuid=uuid)

    if game_ref:
        return render_template('citation.html',
                               citeref=game_ref,
                               is_game=True,
                               is_performance=False,
                               derived_performances=derived_performances,
                               extra_files=extra_files,
                               save_states=save_states)
    elif perf_ref:
        performance_video = "/cite_data/{}/{}".format(perf_ref['replay_source_file_ref'],
                                                      perf_ref['replay_source_file_name'])
        return render_template('citation.html',
                               citeref=perf_ref,
                               is_game=False,
                               is_performance=True,
                               previous_performances=previous_performances,
                               performance_video=performance_video)
    return "No record found, sorry."
开发者ID:gamecip,项目名称:citetool-editor,代码行数:28,代码来源:app.py

示例2: make_performance_package

# 需要导入模块: from database import DatabaseManager [as 别名]
# 或者: from database.DatabaseManager import retrieve_performance_chain [as 别名]
 def make_performance_package(performance):
     pack = {}
     game = dbm.retrieve_game_ref(performance['game_uuid'])
     pack['game'] = game.elements if game else None
     pack['performance'] = performance.elements
     #   Last performance is current performance
     pack['previous_performances'] = [i.elements for i in dbm.retrieve_performance_chain(performance['uuid'])[:-1]]
     return pack
开发者ID:gamecip,项目名称:citetool-editor,代码行数:10,代码来源:citetool_editor.py


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