SearchFilter with unaccent

based on https://github.com/encode/django-rest-framework/pull/7733
This commit is contained in:
Asif Saif Uddin 2022-11-23 20:25:13 +06:00 committed by GitHub
parent c0d95cb967
commit 132a4f962d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@ class SearchFilter(BaseFilterBackend):
'=': 'iexact', '=': 'iexact',
'@': 'search', '@': 'search',
'$': 'iregex', '$': 'iregex',
'&': 'unaccent',
} }
search_title = _('Search') search_title = _('Search')
search_description = _('A search term.') search_description = _('A search term.')