Closed robslotboom closed 8 years ago
I just added and changed a few lines of code and ran migrate watson without any problems.
settings.py
# Watson settings
if LANGUAGE_CODE == 'nl':
SEARCH_CONFIG = "pg_catalog.dutch"
else:
SEARCH_CONFIG = "pg_catalog.english"
watson/backends.py
from django.conf import settings
class PostgresSearchBackend(SearchBackend):
search_config = getattr(settings, 'SEARCH_CONFIG', 'pg_catalog.english')
I’ll now register some models and do some tests.
To be continued...
Looks great!
Call it WATSON_POSTGRES_SEARCH_CONFIG
, and hit me with a pull request!
Hi folks,
Why not introduce SEARCH_CONFIG ="pg_catalog.english" in settings. It then can be refered to in Watson...
Cheers
Robert