Re: View method + template

2009-04-28 Thread 83nini
thanks it worked.. wohooo, lets django :D cheers On 28 Apr, 10:49, jeff wrote: > I don't know exactly what the tutorial says to do, but it seems to me > that the problem is with this line: > >     if 'q' in request.GET and request.GET['q']: > > If you've entered an empty query -- "" -- then the

Re: View method + template

2009-04-28 Thread jeff
I don't know exactly what the tutorial says to do, but it seems to me that the problem is with this line: if 'q' in request.GET and request.GET['q']: If you've entered an empty query -- "" -- then the first condition ('q' in request.GET) would be true, but the second condition (request.GET['

View method + template

2009-04-28 Thread 83nini
Hi guys, I'm working on the tutorial in www.djangobook.com and I reached the point where I'm making a search form, here is what my view methods look like: def search_form(request): return render_to_response('search_form.html') def search(request): error = False if 'q' in request.GET