1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-30 23:21:16 +02:00
Files
plateforme-corres2math/apps/participation/search_indexes.py
Yohann D'ANELLO f05d2cca0b Autocomplete index
2020-10-15 17:26:22 +02:00

26 lines
596 B
Python

from haystack import indexes
from .models import Participation, Team, Video
class TeamIndex(indexes.ModelSearchIndex, indexes.Indexable):
text = indexes.NgramField(document=True, use_template=True)
class Meta:
model = Team
class ParticipationIndex(indexes.ModelSearchIndex, indexes.Indexable):
text = indexes.NgramField(document=True, use_template=True)
class Meta:
model = Participation
class VideoIndex(indexes.ModelSearchIndex, indexes.Indexable):
text = indexes.NgramField(document=True, use_template=True)
class Meta:
model = Video