Mercurial > public > sg101
comparison gpp/urls.py @ 438:524fd1b3919a
Fixing #214; don't need a custom model search view. All the info is in the template. Wrote a template tag to extract the info from the request context and urlencode them.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 18 May 2011 03:04:25 +0000 |
parents | d4d167876c25 |
children | 3b30286adba5 |
comparison
equal
deleted
inserted
replaced
437:a8ac4dd3bf03 | 438:524fd1b3919a |
---|---|
5 | 5 |
6 from haystack.views import search_view_factory | 6 from haystack.views import search_view_factory |
7 | 7 |
8 from news.feeds import LatestNewsFeed | 8 from news.feeds import LatestNewsFeed |
9 from forums.feeds import ForumsFeed | 9 from forums.feeds import ForumsFeed |
10 from custom_search import ModelSearchView, CustomModelSearchForm | 10 from custom_search import CustomModelSearchForm |
11 | 11 |
12 | 12 |
13 admin.autodiscover() | 13 admin.autodiscover() |
14 | 14 |
15 urlpatterns = patterns('', | 15 urlpatterns = patterns('', |
51 ) | 51 ) |
52 | 52 |
53 # Haystack search views | 53 # Haystack search views |
54 urlpatterns += patterns('haystack.views', | 54 urlpatterns += patterns('haystack.views', |
55 url(r'^search/$', | 55 url(r'^search/$', |
56 search_view_factory(view_class=ModelSearchView, | 56 search_view_factory(form_class=CustomModelSearchForm, load_all=True), |
57 form_class=CustomModelSearchForm, load_all=True), | |
58 name='haystack_search'), | 57 name='haystack_search'), |
59 ) | 58 ) |
60 | 59 |
61 | 60 |
62 if settings.DEBUG: | 61 if settings.DEBUG: |