[facet] add extra_kwargs instance property on CWFacetedSearch

authorSamuel Trégouët <samuel.tregouet@logilab.fr>
changesetd93ffcdabd6e
branchdefault
phasepublic
hiddenno
parent revision#9fd50d807896 [views] use q=term by default instead of search (closes #17049619)
child revision#b77283c8e668 Added tag 0.1.1, debian/0.1.1-1 for changeset d93ffcdabd6e
files modified by this revision
views.py
# HG changeset patch
# User Samuel Trégouët <samuel.tregouet@logilab.fr>
# Date 1485252218 -3600
# Tue Jan 24 11:03:38 2017 +0100
# Node ID d93ffcdabd6e07115b0f8a4a2b5db1d28fdde3af
# Parent 9fd50d80789695f743c46040c37db8f247dd75a1
[facet] add extra_kwargs instance property on CWFacetedSearch

diff --git a/views.py b/views.py
@@ -44,17 +44,19 @@
1      def __init__(self, query=None,
2                   filters={},
3                   doc_types=None,
4                   index=None,
5                   parents_for=None,
6 -                 children_for=None):
7 +                 children_for=None,
8 +                 **kwargs):
9          if index:
10              self.index = index
11          if doc_types:
12              self.doc_types = doc_types
13          self.parents_for = parents_for
14          self.children_for = children_for
15 +        self.extra_kwargs = kwargs
16          super(CWFacetedSearch, self).__init__(query, filters)
17 
18      def query(self, search, query):
19          if query:
20              return compose_search(search,