forked from TagesschuleElementa/www.tagesschule-elementa.ch
haystack search multilang
This commit is contained in:
@@ -54,9 +54,15 @@ HAYSTACK_DEFAULT_OPERATOR = 'OR'
|
||||
HAYSTACK_CONNECTIONS = {
|
||||
'default': {
|
||||
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
|
||||
'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', 'de'),
|
||||
'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', 'default'),
|
||||
},
|
||||
}
|
||||
for lang_code, lang in LANGUAGES:
|
||||
HAYSTACK_CONNECTIONS[lang_code] = {}
|
||||
HAYSTACK_CONNECTIONS[lang_code].update({
|
||||
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
|
||||
'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', lang_code),
|
||||
})
|
||||
|
||||
HAYSTACK_ROUTERS = ['aldryn_search.router.LanguageRouter', ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user