13 lines
244 B
Python
Executable File
13 lines
244 B
Python
Executable File
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)
|
|
|