Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. from haystack import indexes, site
  2. from meeks.products.models import Brand, Product
  3.  
  4. class BrandIndex(indexes.SearchIndex):
  5.     text = indexes.CharField(document=True, use_template=True)
  6.  
  7. class ProductIndex(indexes.SearchIndex):
  8.     text = indexes.CharField(document=True, use_template=True)
  9.  
  10. site.register(Product, ProductIndex)
  11. site.register(Brand, BrandIndex)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement