search stuff

This commit is contained in:
Sanj 2011-10-10 16:01:09 +05:30
parent ca35d9c890
commit cc38eb0573
4 changed files with 34 additions and 0 deletions

26
itf/festival/search_indexes.py Executable file
View File

@ -0,0 +1,26 @@
from haystack.indexes import *
from haystack import site
from models import *
class MeetingIndex(SearchIndex):
text = CharField(document=True, use_template=True)
'''
def index_queryset(self):
"""Used when the entire index for model is updated."""
return Note.objects.filter(pub_date__lte=datetime.datetime.now())
'''
class ProjectIndex(SearchIndex):
text = CharField(document=True, use_template=True)
class ParticipantIndex(SearchIndex):
text = CharField(document=True, use_template=True)
site.register(Meeting, MeetingIndex)
site.register(Project, ProjectIndex)
site.register(Participant, ParticipantIndex)

View File

@ -0,0 +1,3 @@
{{ object.title }}
{{ object.intro }}

View File

@ -0,0 +1,3 @@
{{ object.name }}
{{ object.title }}
{{ object.short_bio }}

View File

@ -0,0 +1,2 @@
{{ object.title }}
{{ object.intro }}