@home_routes.route('/set_role', methods=('GET', 'POST'))
@login_required
def set_role():
 id = request.args['id']
 role = request.args['roles']
 user = DataGetter.get_user(id)
 user.role = role
 save_to_db(user, 'User Role updated')
 return redirect(url_for('.roles_manager'))

@ home_routes . route ( '/set_role' , methods = ( 'GET' , 'POST' ) ) @ login_required def set_role ( ) : id = request . args [ 'id' ] role = request . args [ 'roles' ] user = DataGetter . get_user ( id ) user . role = role save_to_db ( user , 'User Role updated' ) return redirect ( url_for ( '.roles_manager' ) )
assign role to username .