L
L
lleballex2020-10-18 12:24:31
Django
lleballex, 2020-10-18 12:24:31

How to implement case insensitive search in Django?

The Django project has a Post model that has a title . And I need to filter posts by the occurrence of a phrase in the title, not paying attention to case:
Post.objects.filter(title__icontains=text)
If the title of the post is in English, everything works, but in Russian the search is case sensitive. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2020-10-18
@deliro

Change the database from SQLite to any other. And read this: https://ru.stackoverflow.com/a/402778

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question