- template = '''unaccent(
- %(function)s('polish', %(expressions)s)::text)::tsvector ||
- to_tsvector(
- 'polish_simple',
- unaccent(%(expressions)s)
- )'''
+ if settings.SEARCH_USE_UNACCENT:
+ template = f'''unaccent(
+ %(function)s('{settings.SEARCH_CONFIG}', %(expressions)s)::text)::tsvector ||
+ to_tsvector(
+ '{settings.SEARCH_CONFIG_SIMPLE}',
+ unaccent(%(expressions)s)
+ )'''