On 6 Oct 2006, at 21:26, RajeshD wrote:

>
>> for word in words:
>>         q = q.filter(  Q(title__icontains=word)     )
>>
> Try something like this instead of the above:
>
> q_fragment = Q(title__icontains=words[0])
> for word in words[1:]
>       q_fragment = q_fragment | Q(title__icontains=word)
> q = q.filter(q_fragment)

Thanks... I can't believe that worked...

a = b | c

wow...

Still can't...




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to