> However when I get the query from
> request.POST, it throws up server error (500).

Well, I kind of doubt that jQuery in the browser is causing a 500
error on the server.

I strongly recommend setting DEBUG=True in your settings.py file.
Django gives you a perfectly lovely, formatted stack trace, complete
with source code windows and local variables.

> >     if request.POST.has_key('query'):
>         query = unicode(request.POST['query'])
>         qfld = unicode(request.POST['qtype'])
>         if (query):
>             qfilter= {"%s__contains" % qfld : query}
>             books = Book.objects.filter(**qfilter)

The first guess I would make is that one of the if conditions
evaluates to False and then later code (maybe in the context being
passed to the template) is referencing a variable that was never set.

> (From front end, I am passing the same values - cep and publisher)

My gut says this may not be a correct statement. Once you have DEBUG
turned on you may immediately see the error of your ways. If not,
trying putting a statement of 1/0 just before the first if. This will
cause a Divide by Zero error, and give you that stack trace *and* all
of the environment values that Django has.

  HTH,
  Peter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to