From 95cf290e2c537c488409f3730b1ed620ecfa45a0 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 5 Apr 2012 23:44:20 -0400 Subject: [PATCH] Add haystack to the requirements --- requirements/production.txt | 45 +++++++++++++++++++++++++++++++++++-- settings.py | 8 +++++++ urls.py | 1 + 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/requirements/production.txt b/requirements/production.txt index 41ab10ed77..14dc4aeb91 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,19 +1,60 @@ +# Base + Django==1.3.1 django-pagination==1.0.7 -wsgiref==0.1.2 + +# Tags + django-taggit==0.9.3 + +# Indexes + -e git://github.com/django-mptt/django-mptt.git@0af02a95877041b2fd6d458bd95413dc1666c321#egg=django-mptt + +# Mimetypes + -e git://github.com/ahupp/python-magic.git@a75cf0a4a7790eb106155c947af9612f15693b6e#egg=python-magic + slate==0.3 -ghostscript==0.4.1 pdfminer==20110227 + +# Scheduler + APScheduler==2.0.2 + +# Python converter backend + Pillow==1.7.4 +ghostscript==0.4.1 + +# Asset compression + cssmin==0.1.4 django-compressor==1.1.1 + +# Sendfile + -e git://github.com/rosarior/django-sendfile.git#egg=django-sendfile + +# API + djangorestframework==0.2.3 + +# Migrations + South==0.7.3 + +# Keys and signing + python-gnupg==0.2.8 python-hkp==0.1.3 + +# Feedback + requests==0.10.1 + +# Search + +-e git+https://github.com/toastdriven/django-haystack.git@c6fd81d4163eb816476a853d416b68757e0c7ca4#egg=django_haystack-dev +Whoosh==2.3.2 +Unidecode==0.04.9 diff --git a/settings.py b/settings.py index c6894408c2..206f22c1c4 100644 --- a/settings.py +++ b/settings.py @@ -131,6 +131,7 @@ INSTALLED_APPS = ( # 3rd party # South 'south', + 'haystack', # Others 'filetransfers', 'taggit', @@ -198,6 +199,13 @@ COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter', 'com COMPRESS_ENABLED=False SENDFILE_BACKEND = 'sendfile.backends.simple' +#--------- Haystack ----------- +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), + }, +} #--------- Web theme --------------- WEB_THEME_ENABLE_SCROLL_JS = False #--------- Django ------------------- diff --git a/urls.py b/urls.py index ee1f199449..80d8cdef7d 100644 --- a/urls.py +++ b/urls.py @@ -9,6 +9,7 @@ urlpatterns = patterns('', (r'^', include('main.urls')), (r'^documents/', include('documents.urls')), (r'^folders/', include('folders.urls')), + #(r'^search/', include('haystack.urls')), (r'^search/', include('dynamic_search.urls')), (r'^ocr/', include('ocr.urls')), (r'^permissions/', include('permissions.urls')),