summaryrefslogtreecommitdiff
path: root/program/search_indexes.py
blob: 4b0cf74b97b2718589b7171a633ddc85d4bbca44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from haystack.indexes import CharField, SearchIndex
from haystack import site

from models import Note, Show

class NoteIndex(SearchIndex):
    SearchableText = CharField(document=True, use_template=True)

class ShowIndex(SearchIndex):
    SearchableText = CharField(document=True, use_template=True)

site.register(Note, NoteIndex)
site.register(Show, ShowIndex)