flask recive list

Solutions on MaxInterview for flask recive list by the best coders in the world

showing results for - "flask recive list"
Aymen
16 Oct 2019
1@app.route('/users/', methods=['POST'])
2def get_users():
3    ids = request.form.getlist('user_ids', type=int)
4    users = []
5
6    for id in ids:
7        try:
8            user = whatever_user_method(id)
9            users.append(user)
10        except:
11            continue
12
13    returns users
14
similar questions
queries leading to this page
flask recive list