mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-05 10:34:09 +02:00
Use Django-Haystack to make indexed researches
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import re
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from corres2math.lists import get_sympa_client
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.core.validators import RegexValidator
|
||||
@ -56,6 +58,9 @@ class Team(models.Model):
|
||||
|
||||
return super().save(*args, **kwargs)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy("participation:team_detail", args=(self.pk,))
|
||||
|
||||
def __str__(self):
|
||||
return _("Team {name} ({trigram})").format(name=self.name, trigram=self.trigram)
|
||||
|
||||
@ -115,6 +120,9 @@ class Participation(models.Model):
|
||||
verbose_name=_("synthesis video"),
|
||||
)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy("participation:team_detail", args=(self.pk,))
|
||||
|
||||
def __str__(self):
|
||||
return _("Participation of the team {name} ({trigram})").format(name=self.team.name, trigram=self.team.trigram)
|
||||
|
||||
|
Reference in New Issue
Block a user