Mercurial > public > sg101
diff gpp/urls.py @ 219:26ee684c2033
Initial commit of Haystack search integration. See #51.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 Jun 2010 20:46:52 +0000 |
parents | 8c1832b9d815 |
children | 71fd8454688b |
line wrap: on
line diff
--- a/gpp/urls.py Tue Jun 01 05:16:40 2010 +0000 +++ b/gpp/urls.py Sat Jun 05 20:46:52 2010 +0000 @@ -3,6 +3,8 @@ from django.contrib import admin from django.views.decorators.cache import cache_page +from haystack.views import SearchView, search_view_factory + from news.feeds import LatestNewsFeed from forums.feeds import ForumsFeed @@ -45,6 +47,13 @@ (r'^smiley/', include('smiley.urls')), ) +# Haystack search views +urlpatterns += patterns('haystack.views', + url(r'^search/$', search_view_factory(view_class=SearchView, load_all=False), + name='haystack_search'), +) + + if settings.DEBUG: urlpatterns += patterns('', (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),