I’ve got a model with a Contact object.  It has separate attributes for firstName and lastName.  In various parts of my app I’d like to be able to provide a search function where a user could type in part of a person’s name that included the first name and part of the last and then display a list of those matching.


I know I can search on just the firstName using:


contacts = Contact.select(Contact.q.firstName.contains(searchText.encode(‘utf8’)))


But, if someone types ‘Jim Steil’ in the search box, this filter would exclude the record for me because of the last name being there.  I’m wondering if there is some magic in SQLObject that will allow me to apply this search string against the combination of the firstName and lastName attributes of the Contact object.