Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from oscar.apps.search.search_indexes import ProductIndex as AbstractProductIndex
- class ProductIndex(AbstractProductIndex):
- def index_queryset(self, using=None):
- # Only index browsable products (not each individual child product)
- return self.get_model().objects.all().order_by('-date_updated')
- def read_queryset(self, using=None):
- return self.get_model().objects.all().base_queryset()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement