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 in "Bunny Foo" to find first and last name they
won't find anything using the above query. How can I concatenate
firstname || lastname to make contactname and use it in the qset?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---