MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / no_query_found

Method no_query_found

haystack/forms.py:37–46  ·  view source on GitHub ↗

Determines the behavior when no query was found. By default, no results are returned (``EmptySearchQuerySet``). Should you want to show all results, override this method in your own ``SearchForm`` subclass and do ``return self.searchqueryset.all()``.

(self)

Source from the content-addressed store, hash-verified

35 super().__init__(*args, **kwargs)
36
37 def no_query_found(self):
38 """
39 Determines the behavior when no query was found.
40
41 By default, no results are returned (``EmptySearchQuerySet``).
42
43 Should you want to show all results, override this method in your
44 own ``SearchForm`` subclass and do ``return self.searchqueryset.all()``.
45 """
46 return EmptySearchQuerySet()
47
48 def search(self):
49 if not self.is_valid():

Callers 1

searchMethod · 0.95

Calls 1

EmptySearchQuerySetClass · 0.90

Tested by

no test coverage detected