django QueryDict only returns the last value of a list

后端 未结 3 1590
鱼传尺愫
鱼传尺愫 2021-02-12 09:20

Using django 1.8, I\'m observing something strange. Here is my javascript:

function form_submit(){
  var form = $(\'#form1_id\');
  request = $.post($(this).attr         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-12 10:20

    You can use getlist method

    data = request.POST.getlist('form_4606-parentspass_id','')
    

提交回复
热议问题