I'm trying to implement a search in a django sqlite db.
I get a list of unknown length of params which should all be matched with a 'LIKE'. This means I want all objects that match at least one of the params.
As I can see from the django docs I can reach this by using the Q object.
Example:
Students.objects.get(
Q(name_contains='franz') |
Q(birthdate_date=date(2005, 5, 2) |
Q(param3_contains='lorem'
)
Now my question is, how can I handle it to join all the Q objects created from params to pass as arguments to the objects.get(). I could not find any on this.
Another issue here is to handle several different Field Lookup types.
I appreciate any advice, help or helping links you can give. Thank you.