Re: Generating Q objects for different model fields

2007-09-16 Thread Tim Chase
> I'd like to make a filter composed by ORing several Q objects, each of > which acts on a different model field. > For example I have a model with the fields "name", "title", > "description" and I want to make a Q object like the following: > Q_name = (Q(name__istartswith="hello") & Q(name__icont

Generating Q objects for different model fields

2007-09-16 Thread cesco
Hi, I'd like to make a filter composed by ORing several Q objects, each of which acts on a different model field. For example I have a model with the fields "name", "title", "description" and I want to make a Q object like the following: Q_name = (Q(name__istartswith="hello") & Q(name__icontains=