Mercurial > public > sg101
diff gpp/urls.py @ 415:d4d167876c25
Fixing #205; search result pagination wasn't including models. Created a custom model search form so that the query term and model selections would persist across pages.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 10 Apr 2011 00:32:14 +0000 |
parents | 2a03c69792d8 |
children | 524fd1b3919a |
line wrap: on
line diff
--- a/gpp/urls.py Sat Apr 09 19:20:12 2011 +0000 +++ b/gpp/urls.py Sun Apr 10 00:32:14 2011 +0000 @@ -3,10 +3,11 @@ from django.contrib import admin from django.views.decorators.cache import cache_page -from haystack.views import SearchView, search_view_factory +from haystack.views import search_view_factory from news.feeds import LatestNewsFeed from forums.feeds import ForumsFeed +from custom_search import ModelSearchView, CustomModelSearchForm admin.autodiscover() @@ -51,7 +52,9 @@ # Haystack search views urlpatterns += patterns('haystack.views', - url(r'^search/$', search_view_factory(view_class=SearchView, load_all=True), + url(r'^search/$', + search_view_factory(view_class=ModelSearchView, + form_class=CustomModelSearchForm, load_all=True), name='haystack_search'), )