Commits

Daniel Jaouen committed 3f84a28

search indexes.

Comments (0)

Files changed (1)

stoat/search_indexes.py

 import datetime
 from haystack.indexes import *
 from haystack import site
+
+from django.conf import settings
+
 from models import Page
 
+INDEX_CLASS = getattr(settings, 'STOAT_HAYSTACK_INDEX_CLASS', SearchIndex)
 
-class PageIndex(SearchIndex):
+class PageIndex(INDEX_CLASS):
     text = CharField(document=True, use_template=True)
     title = CharField(model_attr='title')