Server error at jQuery (Flexigrid) search
All:
I am integrating Flexigrid with Django. And not sure if this is a
jQuery (flexigrid) issue or a Django issue. Hopefully one of you will
help me.
I am able to display the flexigrid and populate the rows. However, I'm
encountering an error at search.
If I do the below (at the server code):
query = 'cep'
qfld = 'publisher'
if (query):
qfilter= {"%s__contains" % qfld : query}
books = Book.objects.filter(**qfilter)
the values are correctly populated. However when I get the query from
request.POST, it throws up server error (500).
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)
(From front end, I am passing the same values - cep and publisher)
Can someone give some helping hand?
BTW; this is under windows/development server
Thank you,
Joseph
http://www.jjude.com