开发者

Accessing POST params with same name in python

I need to get v开发者_StackOverflow中文版alues of these check boxes with same name through HTTP "POST".

<input type="checkbox" id="dde" name="dept[]" value="dde"/>
<input type="checkbox" id="dre" name="dept[]" value="dre"/>
<input type="checkbox" id="iid" name="dept[]" value="iid"/>

How to get these values in python using self.request.get() method?


You can use request.get_all().

According to the docs it "Returns a list of values of all of the query (URL) or POST arguments with the given name, possibly an empty list."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜