We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2290a51 commit ff03105Copy full SHA for ff03105
haystack/forms.py
@@ -18,22 +18,12 @@ class SearchForm(forms.Form):
18
q = forms.CharField(required=False, label=_('Search'))
19
20
def __init__(self, *args, **kwargs):
21
- self.searchqueryset = kwargs.get('searchqueryset', None)
22
- self.load_all = kwargs.get('load_all', False)
+ self.searchqueryset = kwargs.pop('searchqueryset', None)
+ self.load_all = kwargs.pop('load_all', False)
23
24
if self.searchqueryset is None:
25
self.searchqueryset = SearchQuerySet()
26
27
- try:
28
- del(kwargs['searchqueryset'])
29
- except KeyError:
30
- pass
31
-
32
33
- del(kwargs['load_all'])
34
35
36
37
super(SearchForm, self).__init__(*args, **kwargs)
38
39
def search(self):
0 commit comments