當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。