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


Python Rules.delete_capture方法代码示例

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


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

示例1: rules_page

# 需要导入模块: from rules import Rules [as 别名]
# 或者: from rules.Rules import delete_capture [as 别名]
def rules_page(key = None):
    page = Rules(dsn = app.config['dsn'])
    if key == 1:
        return page.open_page("piece_name")
    elif key == 2:
        return page.open_page("piece_move")
    elif key == 3:
        return page.open_page("special_move")
    elif key == 4:
        return page.open_page("the_rule")
    elif key == 5:
        return page.open_page("made_by")
    elif key == 6:
        return page.open_page("date")
    elif key == 7:
        return page.open_page("name")
    elif key == 8:
        return page.open_page("capture_direction")
    elif key == 9:
        return page.open_page("starting_place")
    elif key == 10:
        return page.open_page("can_start")
    elif request.method == 'GET':
        try:
            return page.open_page()
        except:
            return page.init_table()
    elif 'initializeTable' in request.form:
        return page.init_table()
    elif 'addpiece' in request.form:
        piece_name = request.form['piece_name']
        piece_move = request.form['piece_move']
        special_move = request.form['special_move']
        return page.add_piece(piece_name, piece_move, special_move)
    elif 'addcapture' in request.form:
        name = request.form['name']
        capture_direction = request.form['capture_direction']
        starting_place = request.form['starting_place']
        can_start = request.form['can_start']
        return page.add_capture(name, capture_direction, starting_place, can_start)
    elif 'addrule' in request.form:
        the_rule = request.form['the_rule']
        made_by = request.form['made_by']
        date = request.form['date']
        return page.add_rule(the_rule, made_by, date)
    elif 'deletepiece' in request.form:
        piece_name = request.form['piece_name']
        piece_move = request.form['piece_move']
        return page.delete_piece(piece_name, piece_move)
    elif 'deleterule' in request.form:
        the_rule = request.form['the_rule']
        return page.delete_rule(the_rule)
    elif 'deletecapture' in request.form:
        name = request.form['name']
        return page.delete_capture(name)
    elif 'findpiece' in request.form:
        piece_name = request.form['piece_name']
        piece_move = request.form['piece_move']
        return page.find_pieces(piece_name, piece_move)
    elif 'findrule' in request.form:
        the_rule = request.form['the_rule']
        return page.find_rules(the_rule)
    elif 'findcapture' in request.form:
        name = request.form['name']
        return page.find_captures(name)
    else:
        return redirect(url_for('home_page'))
开发者ID:itucsdb1513,项目名称:itucsdb1513,代码行数:69,代码来源:server.py


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