On Wed, Mar 25, 2009 at 3:11 PM, AKK <[email protected]> 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 = 'You submitted an empty form.'
> return HttpResponse(message)
>
> I also tried what you suggested:
>
> if request.GET.get('conditional')
>
> but i got a syntax error.
>
> I'd appreciate any ideas,
>
> Thanks
>
> Andrew
> >
>
Well, you've only put a snippet there, but this is just python so if you
have a syntax error you diagnose it as normal, but I suspect you're missing
the ':' at the end of the line.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---