我在django中創建了一個小型web應用程序,在這裏我發送帶有參數的郵件請求。我可以在django日誌中清楚地看到url中存在的參數,但在視圖中缺少這些參數。django視圖中缺失的郵件參數
url:[18/Mar/2017 12:04:18]「POST /login/[email protected] & Password = ******** HTTP/1.1」200 20 view的.py:
if request.method == 'POST':
for x in request.POST:
print(x)
email = request.POST.get("email","")
Password = request.POST.get("Password", "")
print("email: {0}, password:{1}".format(email, Password))
如果下面的回答幫你解決你的問題,將其標記爲接受,請 –