300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > request.POST.get

request.POST.get

时间:2020-04-16 01:30:35

相关推荐

request.POST.get

/python/att-dictionary-get.html

Python 字典(Dictionary) get() 函数返回指定键的值,如果值不在字典中返回默认值。

本质上是一个字典方法

request.POST可以看做是一个字典

比如mobile =request.POST.get("mobile","12345678910")可以看做

mobile = request.POST["mobile"]if mobile == None:mobile = "12345678910"

大概是这样吧

其他的一些也是如此

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。