Re: Search on concatenated fields of qset

2009-04-02 Thread Jesse
Hello Tim, I gave it a try, no errors, but also no results for the Contact. I think I have a problem in the resultsc statement. How do I filter out both qset3 and qset3_inner? query = request.GET['q'] terms = query.split() # terms = re.findall(r'\w+', query) if query: # will

Re: Search on concatenated fields of qset

2009-04-01 Thread Tim Chase
> My model has firstname and lastname as separate fields. In a search > box if a person types in one name say "Bunny" then based on the > following query they will find Bunny: > > qset = ( > Q(firstname__icontains=query) | > Q(lastname__icontains=query) | > ) >

Search on concatenated fields of qset

2009-04-01 Thread Jesse
My model has firstname and lastname as separate fields. In a search box if a person types in one name say "Bunny" then based on the following query they will find Bunny: qset = ( Q(firstname__icontains=query) | Q(lastname__icontains=query) | ) If a person types