Answers for "flask recive list"

0

flask recive list

@app.route('/users/', methods=['POST'])
def get_users():
    ids = request.form.getlist('user_ids', type=int)
    users = []

    for id in ids:
        try:
            user = whatever_user_method(id)
            users.append(user)
        except:
            continue

    returns users
Posted by: Guest on August-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language