Skip to content

Instantly share code, notes, and snippets.

@ikks
Created February 10, 2012 23:56
Show Gist options
  • Save ikks/1794220 to your computer and use it in GitHub Desktop.
Save ikks/1794220 to your computer and use it in GitHub Desktop.
Pattern for haystack with a custom form and login_required
from haystack.views import SearchView
from django.contrib.auth.decorators import login_required
from apps.informationgathering.forms import RtSearchForm
.
.
.
urlpatterns += patterns('haystack.views',
url(r'^$', login_required(SearchView(
form_class=RtSearchForm
)), name='haystack_search'),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment