|
|
|
|
@ -41,6 +41,8 @@ class Match(models.Model): |
|
|
|
|
if self.tournament().event: |
|
|
|
|
club = self.tournament().event.club |
|
|
|
|
|
|
|
|
|
if self.confirmed is False: |
|
|
|
|
return "" |
|
|
|
|
if club: |
|
|
|
|
return club.court_name(index) |
|
|
|
|
elif index is not None: |
|
|
|
|
@ -95,10 +97,16 @@ class Match(models.Model): |
|
|
|
|
return '' |
|
|
|
|
elif self.start_date: |
|
|
|
|
if self.started(): |
|
|
|
|
if self.confirmed: |
|
|
|
|
return self.formatted_duration() |
|
|
|
|
else: |
|
|
|
|
return 'À suivre' |
|
|
|
|
else: |
|
|
|
|
timezoned_datetime = timezone.localtime(self.start_date) |
|
|
|
|
if self.confirmed: |
|
|
|
|
return formats.date_format(timezoned_datetime, format='l H:i') |
|
|
|
|
else: |
|
|
|
|
return f"Estimée : {formats.date_format(timezoned_datetime, format='l H:i')}" |
|
|
|
|
else: |
|
|
|
|
return 'À venir...' |
|
|
|
|
|
|
|
|
|
|