Filtering Objects in a View in Django - Oscar?

≡放荡痞女 提交于 2019-12-04 19:46:34

@Anentropic is right but let me elaborate a bit.

Oscar bases all its browse views on search engines so faceting can be used to narrow down the list of products returned. By default there are search engine integrations for Solr and Elasticsearch.

If you don't use Solr or Elasticsearch, the default implementation is SimpleProductSearchHandler. It does not use any external services but instead calls Product.browsable.get_queryset(). That code lives in oscar.apps.catalogue.managers and could be customized to provide custom ordering.

This is all assuming you don't want to use a search engine as customizations required to change the order of results for other search handler classes are backend-specific.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!