diff --git a/advisor/advisor/settings.py b/advisor/advisor/settings.py index 4781ba973939e943c559b906f560cd4e23e54f2a..a8ea38f149b8e2d4232d0889a8a45802dd65259b 100644 --- a/advisor/advisor/settings.py +++ b/advisor/advisor/settings.py @@ -41,6 +41,7 @@ INSTALLED_APPS = ( 'south', 'django_gravatar', 'autocomplete_light', + 'haystack', ) MIDDLEWARE_CLASSES = ( @@ -125,3 +126,11 @@ SWAGGER_SETTINGS = { LOGIN_URL = '/login/' LOGOUT_URL = '/logout/' LOGIN_REDIRECT_URL = '/' + +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), + }, +} + diff --git a/advisor/mainapp/urls.py b/advisor/mainapp/urls.py index 56f1fe65b9a534accbd574a59f104e8f56f8efd9..04255187783af3f682d535301ea8b87ef0d6710c 100644 --- a/advisor/mainapp/urls.py +++ b/advisor/mainapp/urls.py @@ -28,5 +28,6 @@ urlpatterns = patterns('', #name='detail-student'), url(r'^profile/', profile, name='profile-detail'), #name='profile'), + url(r'^search/', include('haystack.urls')), )