2
如何在處理表單時修復以下Django錯誤?Django - 「WSGIRequest」類型的參數不可迭代
TypeError at /url/
argument of type 'WSGIRequest' is not iterable
如何在處理表單時修復以下Django錯誤?Django - 「WSGIRequest」類型的參數不可迭代
TypeError at /url/
argument of type 'WSGIRequest' is not iterable
調試我的代碼〜45分鐘後,我發現通過張貼信息,而不是請求本身請求字典需要以下行:
# This:
# job_form = JobForm(request)
# Should Be:
job_form = JobForm(request.GET) # OR
job_form = JobForm(request.POST)
無法把任何東西本來在Google上。希望這可以幫助別人!