python flask ImmutableMultiDict python flask ImmutableMultiDict flask flask

python flask ImmutableMultiDict


If you are using an HTTP POST method you need to retrieve parameters like this:

 pippo =  request.form.getlist('name[]')

If you use HTTP GET method, do it like this:

 pippo =  request.args.getlist('name[]')

Check the docs here.


you can also do the following:

d = request.form.to_dict()

update: see comments below - if you're expecting an array of params, do the following:

d = request.form.to_dict(flat=False)

sources:immutable multi-dict docto_dict doc