]> git.0d.be Git - panikweb.git/blobdiff - panikweb/search.py
templates: strip label of embed dialog
[panikweb.git] / panikweb / search.py
index f1df7574fea6e63c960ba5a86c8b86e1b37a0d6e..10091bc62f66ef246a71f57405cec3f7b255df82 100644 (file)
@@ -76,7 +76,7 @@ class CustomSolrSearchBackend(haystack.backends.solr_backend.SolrSearchBackend):
             limit_to_registered_models = getattr(settings, 'HAYSTACK_LIMIT_TO_REGISTERED_MODELS', True)
 
         if models and len(models):
-            model_choices = sorted(['%s.%s' % (model._meta.app_label, model._meta.module_name) for model in models])
+            model_choices = sorted(['%s.%s' % (model._meta.app_label, model._meta.model_name) for model in models])
         elif limit_to_registered_models:
             # Using narrow queries, limit the results to only models handled
             # with the current routers.
@@ -135,7 +135,6 @@ class GlobalSearchForm(FacetedSearchForm):
 class SearchView(FacetedSearchView):
     def extra_context(self):
         context = super(SearchView, self).extra_context()
-        context['sectionName'] = 'Search'
         if self.request.GET.getlist('selected_facets'):
             context['facets_qs'] = '&selected_facets=' + '&'.join(self.request.GET.getlist('selected_facets'))
         context['selected_categories'] = [
@@ -182,7 +181,6 @@ class ListenArchivesView(FacetedSearchView):
 
     def extra_context(self):
         context = super(ListenArchivesView, self).extra_context()
-        context['sectionName'] = "Listen"
         if self.request.GET.getlist('selected_facets'):
             context['facets_qs'] = '&selected_facets=' + '&'.join(self.request.GET.getlist('selected_facets'))
         context['selected_format'] = [
@@ -226,7 +224,6 @@ class NewsArchivesView(FacetedSearchView):
         context = super(NewsArchivesView, self).extra_context()
         if self.request.GET.getlist('selected_facets'):
             context['facets_qs'] = '&selected_facets=' + '&'.join(self.request.GET.getlist('selected_facets'))
-        context['sectionName'] = 'News'
         context['selected_news_categories'] = [
                 x.split(':', 1)[1] for x in self.request.GET.getlist('selected_facets')
                 if x.startswith('news_categories_exact')]