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 the SearchQuerySet 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 http://django-haystack.readthedocs.org/en/v2.1.0/views_and_forms.html#facetedsearchform # noqa
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.