Search¶
Oscar provides a search view that extends Haystack’s FacetedSearchView
to
provide better support for faceting.
Facets are configured using the
OSCAR_SEARCH_FACETS
setting, which is used to configure theSearchQuerySet
instance within the search application class.A simple search form is injected into each template context using a context processor
oscar.apps.search.context_processors.search_form
.
Views¶
- class oscar.apps.search.views.FacetedSearchView(*args, **kwargs)[source]¶
A modified version of Haystack’s FacetedSearchView
Note that facets are configured when the
SearchQuerySet
is initialised. This takes place in the search application class.See https://django-haystack.readthedocs.io/en/v2.1.0/views_and_forms.html#facetedsearchform
Forms¶
- class oscar.apps.search.forms.BrowseCategoryForm(*args, **kwargs)[source]¶
Variant of SearchForm that returns all products (instead of none) if no query is specified.
- property media¶
Return all media required to render the widgets on this form.