2011-05-07 150 views
6

我在我的views.py文件中得到這個函數的這個錯誤。這很令人困惑,因爲我不知道'WSGIRequest'是什麼或者它爲什麼會給我帶來問題。我知道我有一個名爲「newUser」的變量,因爲當我拿出那一行時,print(request.POST)行將它打印出來。'WSGIRequest'對象不是可訂閱的

高清AddNewUser函數(請求):

a=AMI() 
if(request.method == "POST"): 
    print(request.POST) 
    print(request["newUser"]) 
csrfContext = RequestContext(request) 
return render_to_response("ac/AddNewUser.html", csrfContext) 

`

爲什麼會出現這個錯誤?

回答