django-oscar
releases-1.1
  • Sample Oscar projects
  • Building your own shop
  • Building an e-commerce site: the key questions
  • Modelling your catalogue
  • Getting help
  • Glossary
  • Customising Oscar
  • Dynamic class loading explained
  • Prices and availability
  • Deploying Oscar
  • Translation
  • Upgrading
  • Forking an app
  • Core functionality
  • Oscar’s apps
    • Address
    • Analytics
    • Basket
    • Catalogue
    • Checkout
    • Customer
    • Dashboard
    • Offers
    • Order
    • Partner
    • Payment
    • Promotions
    • Search
      • Views
      • Forms
      • Utils
    • Shipping
    • Voucher
    • Wishlists
  • Recipes
  • Oscar settings
  • Signals
  • Template tags
  • Oscar design decisions
  • Release notes
  • Contributing to Oscar
 
django-oscar
  • Docs »
  • Oscar Core Apps explained »
  • Search
  • Edit on GitHub

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.

class oscar.apps.search.forms.SearchForm(*args, **kwargs)[source]¶

In Haystack, the search form is used for interpreting and sub-filtering the SQS.

selected_multi_facets[source]¶

Validate and return the selected facets

class oscar.apps.search.forms.SearchInput(attrs=None)[source]¶

Defining a search type widget

This is an HTML5 thing and works nicely with Safari, other browsers default back to using the default “text” type

Utils¶

oscar.apps.search.facets.base_sqs()[source]¶

Return the base SearchQuerySet for Haystack searches.

Next Previous

© Copyright . Revision 33900994a9749574f8bc2fd8e498c442fa1b12af.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: releases-1.1
Versions
latest
stable
releases-1.1
releases-1.0
releases-0.7
releases-0.6
releases-0.5
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.