views:

309

answers:

1

How do you fix the following Django bug when working with forms?

TypeError at /url/ argument of type 'WSGIRequest' is not iterable

+1  A: 

After debugging my code for ~45 minutes, I found the following line needed to pass the request dict of posted information instead of the request itself:

job_form = JobForm(request) (should be) job_form = JobForm(request.GET) (or) job_form = JobForm(request.POST)

Couldn't turn anything up originally on Google. Hope this helps someone!

Tom