maps = (maps.filter(name__icontains=search_terms) |
maps.filter(description__icontains=search_terms))
I can't find the meaning of these filter arguments.
It's a case-insensitive containment test.
Example:
Entry.objects.get(headline__icontains='Lennon')
SQL equivalent:
SELECT ... WHERE headline ILIKE '%Lennon%';
In your case the code says maps should be True
if either the name or the description field contains the value of search_terms
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With