python flask ImmutableMultiDict

后端 未结 2 1560
醉话见心
醉话见心 2021-02-01 04:28

This is my code:

@user_bp.route(\'/band\', methods=[\'GET\', \'POST\'])
def band_details():
    from include.form.User import Banddetails
    form = Banddetails         


        
2条回答
  •  死守一世寂寞
    2021-02-01 04:59

    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.

提交回复
热议问题