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"

 大概是這樣吧

其他的一些也是如此


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM