my form "didn't return an HttpResponse object."

570 views
Skip to first unread message

joshuajonah

unread,
Jul 7, 2008, 11:10:39 AM7/7/08
to Django users
I'm not sure where I'm going wrong here. I have a form, when i submit
it, even blank if gives me this error. I have tried changing it to
POST and then back to a GET submit, but it still doesn't get the
response.

Here's the debug page with bonus GET vars too! (this way both POST and
GET vars are being sent):
http://www.hftvnetwork.com/ProductInventory/?first_name=&last_name=&company=&address=&city=&state=&zipcode=&phone_number=&email_address=&fax=&website=&number_of_stores=&store_size=&store_traffic=&Bird_blank_0=&Bird_blank_1=&Bird_blank_2=&Bird_blank_3=&Bird_blank_4=&Bird_blank_5=&Bird_blank_6=&Bird_blank_7=&Bird_blank_8=&Bird_blank_9=&Bird_blank_10=&Bird_blank_11=&Toys_blank_0=&Toys_blank_1=&Toys_blank_2=&Toys_blank_3=&Toys_blank_4=&Toys_blank_5=&Toys_blank_6=&Toys_blank_7=&Toys_blank_8=&Toys_blank_9=&Toys_blank_10=&submit=Submit

my form tag is like this: <form action="" method="POST">

Any ideas?

Malcolm Tredinnick

unread,
Jul 7, 2008, 11:14:10 AM7/7/08
to django...@googlegroups.com

The error has nothing to do with your form. It's saying that the view
function did not return an HttpResponse object. So have a look at the
view function involved and fix that problem.

Regards,
Malcolm


rui

unread,
Jul 7, 2008, 1:31:15 PM7/7/08
to django...@googlegroups.com
Remember to always _return_ a HttpResponse from your view.

def myview(request):
return HttpResponse("Hello World")

or

def myotherview(request):
return render_to_response("mytemplate.html", locals())

Cheers and good luck.
--
Rui

Reply all
Reply to author
Forward
0 new messages