Beispiel #1
0
def power_boat():
    dsn=app.config['dsn']
    page = PowerBoat(dsn)

    if request.method == 'GET':
        return page.show_all()  # change is made here
    elif 'Add' in request.form:
        name = request.form['name']
        team = request.form['team']
        boat = request.form['boat']
        table = request.form['table']
        return page.add(name ,team , boat ,table)
    elif 'Delete' in request.form:
        id = request.form['select']
        table = request.form['table']
        return page.delete(id ,table)
    elif 'Update' in request.form:
        id = request.form['select']
        name = request.form['name']
        team = request.form['team']
        boat = request.form['boat']
        table = request.form['table']
        return page.update(id,name,team,boat,table)
    elif 'Reset' in request.form:
        table = request.form['table']
        return page.reset_driver()
Beispiel #2
0
def oper2powerboat():
    dsn = app.config['dsn']
    page = PowerBoat(dsn)
    if request.method == 'GET':
        return page.disp_second()
    elif 'Join1' in request.form:
        return page.join1()
    elif 'Join2' in request.form:
        return page.join2()
    elif 'LJoin' in request.form:
        return page.Ljoin()
    elif 'RJoin' in request.form:
        return page.Rjoin()
    elif 'FJoin' in request.form:
        return page.Fjoin()
    elif 'Union' in request.form:
        return page.union()
    elif 'Intersect' in request.form:
        return page.intersect()
    elif 'Minus' in request.form:
        return page.minus()
    elif 'Best' in request.form:
        return page.best()
Beispiel #3
0
def table_init():
    dsn=app.config['dsn']
    page = PowerBoat(dsn)
    return page.initdb()
Beispiel #4
0
def show_oldraces():
    dsn=app.config['dsn']
    page = PowerBoat(dsn)
    if request.method == 'GET':
        return page.show_oldraces()