Answer the question
In order to leave comments, you need to log in
How to make search_fields case-insensitive for the Russian language in the Django admin panel?
I add a search field in the admin panel. The documentation says that the search is case-insensitive. If you search in English, then it is. But in Russian, for some reason, it is not like that. Why might this be?
class HtmlPartAdmin(admin.ModelAdmin):
list_display = ('title', 'get_text', 'slug', )
list_display_links = ('title', )
search_fields = ('title', 'text')
prepopulated_fields = {'slug': ('title',)}
admin.site.register(HtmlPart, HtmlPartAdmin)
Answer the question
In order to leave comments, you need to log in
SQLite is not friendly with the Russian language and search. Use postgres.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question