1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-26 05:42:20 +00:00
plateforme-corres2math/apps/participation/search_indexes.py

25 lines
595 B
Python
Raw Normal View History

from haystack import indexes
from .models import Participation, Team, Video
2020-10-15 14:29:50 +00:00
class TeamIndex(indexes.ModelSearchIndex, indexes.Indexable):
2020-10-15 15:26:22 +00:00
text = indexes.NgramField(document=True, use_template=True)
2020-10-15 14:29:50 +00:00
class Meta:
model = Team
2020-10-15 14:29:50 +00:00
class ParticipationIndex(indexes.ModelSearchIndex, indexes.Indexable):
2020-10-15 15:26:22 +00:00
text = indexes.NgramField(document=True, use_template=True)
2020-10-15 14:29:50 +00:00
class Meta:
model = Participation
2020-10-15 14:29:50 +00:00
class VideoIndex(indexes.ModelSearchIndex, indexes.Indexable):
2020-10-15 15:26:22 +00:00
text = indexes.NgramField(document=True, use_template=True)
2020-10-15 14:29:50 +00:00
class Meta:
model = Video