Re: View doesn't return HttpResponse object

2010-01-28 Thread Ashok Prabhu
Thanks all. It finally worked. The was a minor issue with my browser. It cached some previous page. On Jan 28, 1:05 pm, Ashok Prabhu wrote: > Please find below the properly indented code. However pdb stack trace > doesn't seem to be of much use in this case. In this code the view is > working pro

Re: View doesn't return HttpResponse object

2010-01-28 Thread Ashok Prabhu
Please find below the properly indented code. However pdb stack trace doesn't seem to be of much use in this case. In this code the view is working properly if the table name is NOT 'Master'. If the table name turns out to be 'Master' the value error is displayed. def dbout(request): try:

Re: View doesn't return HttpResponse object

2010-01-27 Thread Karen Tracey
On Wed, Jan 27, 2010 at 10:02 AM, Malcolm Box wrote: > It was indented if you looked in the original message text - I suspect your > (and my) default email program is stripping leading spaces. > How odd. Looking at it in Gmail one space has been removed from the front of all lines that had more

Re: View doesn't return HttpResponse object

2010-01-27 Thread Daniel Roseman
On Jan 27, 10:38 am, Ashok Prabhu wrote: > Hi, > > I have the following view which throws the error "The view > TCDB.viewdb.views.dbout didn't return an HttpResponse object." I have > tried various indentation for the return statement. But it doesn't > seem to help. Can somebody help? > > def dbou

Re: View doesn't return HttpResponse object

2010-01-27 Thread Malcolm Box
On Wed, Jan 27, 2010 at 2:54 PM, Karen Tracey wrote: > On Wed, Jan 27, 2010 at 9:45 AM, Malcolm Box wrote: > >> That code looks fine to me. I'd suggest sticking an "import >> pdb;pdb.set_trace()" as the first line of the view, then stepping through >> the code (run the server with manage.py runs

Re: View doesn't return HttpResponse object

2010-01-27 Thread Karen Tracey
On Wed, Jan 27, 2010 at 9:45 AM, Malcolm Box wrote: > That code looks fine to me. I'd suggest sticking an "import > pdb;pdb.set_trace()" as the first line of the view, then stepping through > the code (run the server with manage.py runserver). That should quickly > highlight any areas where the

Re: View doesn't return HttpResponse object

2010-01-27 Thread Malcolm Box
That code looks fine to me. I'd suggest sticking an "import pdb;pdb.set_trace()" as the first line of the view, then stepping through the code (run the server with manage.py runserver). That should quickly highlight any areas where the code flow isn't as you expect. Cheers, Malcolm On Wed, Jan

View doesn't return HttpResponse object

2010-01-27 Thread Ashok Prabhu
Hi, I have the following view which throws the error "The view TCDB.viewdb.views.dbout didn't return an HttpResponse object." I have tried various indentation for the return statement. But it doesn't seem to help. Can somebody help? def dbout(request): try: filter_string= request.GET.get('filt