|
|
|
@ -223,7 +223,7 @@ class Tournament(models.Model): |
|
|
|
return None |
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
registration_status = None |
|
|
|
registration_status = None |
|
|
|
if self.online_register_is_enabled() is True: |
|
|
|
if self.enable_online_registration == True: |
|
|
|
registration_status = self.get_online_registration_status().status_localized() |
|
|
|
registration_status = self.get_online_registration_status().status_localized() |
|
|
|
if teams is not None and len(teams) > 0: |
|
|
|
if teams is not None and len(teams) > 0: |
|
|
|
word = "inscription" |
|
|
|
word = "inscription" |
|
|
|
@ -231,6 +231,8 @@ class Tournament(models.Model): |
|
|
|
word = word + "s" |
|
|
|
word = word + "s" |
|
|
|
if registration_status is not None: |
|
|
|
if registration_status is not None: |
|
|
|
return f"{registration_status}\n{len(teams)} {word}" |
|
|
|
return f"{registration_status}\n{len(teams)} {word}" |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
return f"{len(teams)} {word}" |
|
|
|
else: |
|
|
|
else: |
|
|
|
if registration_status is not None: |
|
|
|
if registration_status is not None: |
|
|
|
return f"{registration_status}" |
|
|
|
return f"{registration_status}" |
|
|
|
@ -791,8 +793,11 @@ class Tournament(models.Model): |
|
|
|
return group_stages |
|
|
|
return group_stages |
|
|
|
|
|
|
|
|
|
|
|
def display_rankings(self): |
|
|
|
def display_rankings(self): |
|
|
|
return True |
|
|
|
if self.supposedly_in_progress(): |
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
if self.end_date is not None: |
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
def display_tournament(self): |
|
|
|
def display_tournament(self): |
|
|
|
if self.publish_tournament: |
|
|
|
if self.publish_tournament: |
|
|
|
@ -942,12 +947,12 @@ class Tournament(models.Model): |
|
|
|
|
|
|
|
|
|
|
|
# Date d'ouverture |
|
|
|
# Date d'ouverture |
|
|
|
if self.opening_registration_date: |
|
|
|
if self.opening_registration_date: |
|
|
|
date = formats.date_format(self.opening_registration_date, format='j F Y H:i') |
|
|
|
date = formats.date_format(timezone.localtime(self.opening_registration_date), format='j F Y H:i') |
|
|
|
options.append(f"Ouverture des inscriptions le {date}") |
|
|
|
options.append(f"Ouverture des inscriptions le {date}") |
|
|
|
|
|
|
|
|
|
|
|
# Date limite |
|
|
|
# Date limite |
|
|
|
if self.registration_date_limit: |
|
|
|
if self.registration_date_limit: |
|
|
|
date = formats.date_format(self.registration_date_limit, format='j F Y H:i') |
|
|
|
date = formats.date_format(timezone.localtime(self.registration_date_limit), format='j F Y H:i') |
|
|
|
options.append(f"Clôture des inscriptions le {date}") |
|
|
|
options.append(f"Clôture des inscriptions le {date}") |
|
|
|
|
|
|
|
|
|
|
|
# Cible d'équipes |
|
|
|
# Cible d'équipes |
|
|
|
@ -1055,7 +1060,7 @@ class Tournament(models.Model): |
|
|
|
|
|
|
|
|
|
|
|
# Check if registration is closed |
|
|
|
# Check if registration is closed |
|
|
|
if self.registration_date_limit is not None: |
|
|
|
if self.registration_date_limit is not None: |
|
|
|
if timezone.now() > self.registration_date_limit: |
|
|
|
if timezone.now() > timezone.localtime(self.registration_date_limit): |
|
|
|
return False |
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
# Otherwise unregistration is allowed |
|
|
|
# Otherwise unregistration is allowed |
|
|
|
|