Answer the question
In order to leave comments, you need to log in
How to implement a substring search in a string from a model case-insensitive in sqlite in Cyrillic?
I have a model with a CharField field:
class catalogModel(models.Model):
title = models.CharField('Name', max_length = 100, null = True)
# поисковой запрос
search = request.GET['search']
catalogModel.objects.filter(title__icontains = search)
# поисковой запрос
search = request.GET['search']
catalogModel.objects.filter(title__ВЕРХНИЙ_РЕГИСТР__icontains = search.upper())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question