MCPcopy Create free account
hub / github.com/django-haystack/django-haystack / build_form

Method build_form

haystack/views.py:55–70  ·  view source on GitHub ↗

Instantiates the form the class should use to process the search query.

(self, form_kwargs=None)

Source from the content-addressed store, hash-verified

53 return self.create_response()
54
55 def build_form(self, form_kwargs=None):
56 """
57 Instantiates the form the class should use to process the search query.
58 """
59 data = None
60 kwargs = {"load_all": self.load_all}
61 if form_kwargs:
62 kwargs.update(form_kwargs)
63
64 if len(self.request.GET):
65 data = self.request.GET
66
67 if self.searchqueryset is not None:
68 kwargs["searchqueryset"] = self.searchqueryset
69
70 return self.form_class(data, **kwargs)
71
72 def get_query(self):
73 """

Callers 4

__call__Method · 0.95
test_empty_resultsMethod · 0.95
test_initial_dataMethod · 0.95
build_formMethod · 0.45

Calls 1

updateMethod · 0.45

Tested by 2

test_empty_resultsMethod · 0.76
test_initial_dataMethod · 0.76