Commit 82526dcc7c4159fad529e5e94d18f4357c20a5fb

Authored by Luan
1 parent 4272b47a

Adding haystack to project

requirements.txt
@@ -8,6 +8,7 @@ chardet==1.0.1 @@ -8,6 +8,7 @@ chardet==1.0.1
8 python-dateutil==1.5 8 python-dateutil==1.5
9 django-cliauth==0.9 9 django-cliauth==0.9
10 django-mobile==0.3.0 10 django-mobile==0.3.0
  11 +django-haystack==2.1
11 12
12 gunicorn 13 gunicorn
13 gevent 14 gevent
src/colab/custom_settings.py
@@ -15,6 +15,13 @@ LANGUAGES = ( @@ -15,6 +15,13 @@ LANGUAGES = (
15 15
16 LANGUAGE_CODE = 'pt-br' 16 LANGUAGE_CODE = 'pt-br'
17 17
  18 +HAYSTACK_CONNECTIONS = {
  19 + 'default': {
  20 + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
  21 + 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
  22 + }
  23 +}
  24 +
18 INSTALLED_APPS = INSTALLED_APPS + ( 25 INSTALLED_APPS = INSTALLED_APPS + (
19 26
20 # Not standard apps 27 # Not standard apps
@@ -24,6 +31,7 @@ INSTALLED_APPS = INSTALLED_APPS + ( @@ -24,6 +31,7 @@ INSTALLED_APPS = INSTALLED_APPS + (
24 'django_mobile', 31 'django_mobile',
25 'django_browserid', 32 'django_browserid',
26 'conversejs', 33 'conversejs',
  34 + 'haystack',
27 35
28 # Own apps 36 # Own apps
29 'super_archives', 37 'super_archives',