it/itf/pages/search_indexes.py

13 lines
244 B
Python
Raw Normal View History

2012-03-27 20:28:28 +00:00
from haystack.indexes import *
from haystack import site
from models import Page
class PageIndex(SearchIndex):
text = CharField(document=True, use_template=True)
title = CharField(model_attr='title')
site.register(Page, PageIndex)