예제 #1
0
def deleteone():
    if request.method == 'POST':
         #根据ID来删除用户名
        username = request.form.get('username')
        data = models.mysql_select(username)
        for i in data:
        #根据ID来删除用户名
            id = i[0]
            if models.mysql_del(id):
                return "删除成功"
            else:
                return "删除失败"
예제 #2
0
def deleteone():
    if request.method == 'POST':
        #根据ID来删除用户名
        username = request.form.get('username')
        data = models.mysql_select(username)
        for i in data:
            #根据ID来删除用户名
            id = i[0]
            if models.mysql_del(id):
                return "删除成功"
            else:
                return "删除失败"
예제 #3
0
def select():
    if request.method == 'POST':
        username = request.form.get('user')
        data = models.mysql_select(username)
        return render_template('select.html', pages=data)
예제 #4
0
def select():
    if request.method == 'POST':
        username = request.form.get('user')
        data = models.mysql_select(username)
        return render_template('select.html', pages=data)