Пример #1
0
def update_user(id):
    if request.method == 'GET':
        register_dao_obj = RegisterDAO()
        return_data = register_dao_obj.search_data(id)
        return render_template('update.html', result=return_data)

    else:
        firstname = request.form['firstname']
        lastname = request.form['lastname']
        username = request.form['username']
        password = request.form['password']
        register_dao_obj = RegisterDAO()
        register_dao_obj.update_data(firstname, lastname, username, password, id)
        return redirect('/search')
Пример #2
0
def display_user():
    register_dao_obj = RegisterDAO()
    return_data = register_dao_obj.search_data()
    return render_template('index.html', result=return_data)