request.POST.get

http://www.runoob.com/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"

 大概是这样吧

其他的一些也是如此

原文地址:https://www.cnblogs.com/mangmangbiluo/p/9874968.html