Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Content list view: allow for searching different Content subclass hie…
Browse files Browse the repository at this point in the history
…rarchies.
  • Loading branch information
Adam Wentz committed Nov 7, 2014
1 parent bccb33d commit 8ec951f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bulbs/content/views.py
Expand Up @@ -14,6 +14,7 @@


class ContentListView(ListView):
model = Content

feature_types = None
tags = None
Expand Down Expand Up @@ -80,7 +81,7 @@ def get_queryset(self):
if 'q' in self.request.GET:
search_kwargs['query'] = self.request.GET['q']

return Content.search_objects.search(**search_kwargs)
return self.model.search_objects.search(**search_kwargs)


class BaseContentDetailView(DetailView):
Expand Down Expand Up @@ -153,6 +154,3 @@ def dispatch(self, request, *args, **kwargs):

unpublished = UnpublishedContentView.as_view()
content_list = ContentListView.as_view()



0 comments on commit 8ec951f

Please sign in to comment.