Re: DjangoBook forms

2009-03-30 Thread Andy Mckay
On 23-Mar-09, at 5:53 PM, AKK wrote: > I'm working through chapter 7 of the djangobook online. and i've got > the following: > > def search(request): >if 'criteria' in request.GET: > > however, if i leave it blank rather than it saying "You submitted an > empty form" it says: > > Can someone

Re: DjangoBook forms

2009-03-25 Thread Alex Gaynor
On Wed, Mar 25, 2009 at 3:11 PM, AKK wrote: > > I'm still abit confused. > > Does that mean this part in the book is wrong?: > > def search(request): >if 'q' in request.GET: >message = 'You searched for: %r' % request.GET['q'] > else: >message =

Re: DjangoBook forms

2009-03-25 Thread AKK
I'm still abit confused. Does that mean this part in the book is wrong?: def search(request): if 'q' in request.GET: message = 'You searched for: %r' % request.GET['q'] else: message = 'You submitted an empty form.' return HttpResponse(message) I also tried what you

Re: DjangoBook forms

2009-03-23 Thread Alex Gaynor
On Mon, Mar 23, 2009 at 8:53 PM, AKK wrote: > > Hi, > > I'm working through chapter 7 of the djangobook online. and i've got > the following: > > def search(request): >if 'criteria' in request.GET: >message = 'You searched for: %r' % request.GET['criteria']

DjangoBook forms

2009-03-23 Thread AKK
Hi, I'm working through chapter 7 of the djangobook online. and i've got the following: def search(request): if 'criteria' in request.GET: message = 'You searched for: %r' % request.GET['criteria'] else: message = 'You submitted an empty form.' return