mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-04 01:32:11 +02:00
Index tournaments
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
from haystack import indexes
|
||||
|
||||
from .models import Participation, Team
|
||||
from .models import Participation, Team, Tournament
|
||||
|
||||
|
||||
class TeamIndex(indexes.ModelSearchIndex, indexes.Indexable):
|
||||
@ -24,3 +24,13 @@ class ParticipationIndex(indexes.ModelSearchIndex, indexes.Indexable):
|
||||
|
||||
class Meta:
|
||||
model = Participation
|
||||
|
||||
|
||||
class TournamentIndex(indexes.ModelSearchIndex, indexes.Indexable):
|
||||
"""
|
||||
Index all tournaments by their name.
|
||||
"""
|
||||
text = indexes.NgramField(document=True, use_template=True)
|
||||
|
||||
class Meta:
|
||||
model = Tournament
|
||||
|
Reference in New Issue
Block a user