S
S
sportik1742021-11-25 08:11:43
Python
sportik174, 2021-11-25 08:11:43

How to pass multiple django values ​​to icontains?

Good afternoon!
There is a request like this:

services = Service.objects.filter(title__icontains='мужская стрижка')

Such a query finds only such headers:
Men's haircut
men's haircut

How can I make it find such queries as well?
men's haircut men's
haircut

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2021-11-25
@sportik174

services = Service.objects.filter(Q(title__icontains='мужская')&Q(title__icontains='стрижка'))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question