django获取post请求中的参数 checkbox的值 (获取数组)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38570967/article/details/82055906

当参数为'a=1&a=2&a=3'
request.POST.get('a') –>3 只能获取数组中的最后一个

request.POST.getlist('a') –>[1,2,3]可以获取到数组

猜你喜欢

转载自blog.csdn.net/weixin_38570967/article/details/82055906