From 82526dcc7c4159fad529e5e94d18f4357c20a5fb Mon Sep 17 00:00:00 2001 From: Luan Date: Wed, 2 Oct 2013 21:57:47 -0300 Subject: [PATCH] Adding haystack to project --- requirements.txt | 1 + src/colab/custom_settings.py | 8 ++++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6606e11..7e74b42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ chardet==1.0.1 python-dateutil==1.5 django-cliauth==0.9 django-mobile==0.3.0 +django-haystack==2.1 gunicorn gevent diff --git a/src/colab/custom_settings.py b/src/colab/custom_settings.py index 9fd2ae4..589051c 100644 --- a/src/colab/custom_settings.py +++ b/src/colab/custom_settings.py @@ -15,6 +15,13 @@ LANGUAGES = ( LANGUAGE_CODE = 'pt-br' +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), + } +} + INSTALLED_APPS = INSTALLED_APPS + ( # Not standard apps @@ -24,6 +31,7 @@ INSTALLED_APPS = INSTALLED_APPS + ( 'django_mobile', 'django_browserid', 'conversejs', + 'haystack', # Own apps 'super_archives', -- libgit2 0.21.2