Answer the question
In order to leave comments, you need to log in
How to search for Russian text in django?
There is a need to organize a search for Russian words. From the documentation for django, it is clear that when using the SQLite database, the search is case-sensitive. How it is possible to bypass it? Here is an example of using search:
class ProductListView(ListView):
model = Product
def get_queryset(self):
qs = super().get_queryset()
get_params = self.request.GET.dict()
# search
if get_params.get('q'):
qs = qs.filter(product_title__icontains=get_params.get('q'))
Answer the question
In order to leave comments, you need to log in
Problem with search, case and cyrillic in Django REST Framework?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question