From b8f9f4edf79a6c1c90f9c7d2efa0e1d2d47ec145 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 13 Mar 2024 11:05:24 +0100 Subject: [PATCH] fix --- padelclub_backend/settings.py | 9 +++++---- tournaments/models/match.py | 2 +- tournaments/models/tournament.py | 2 +- tournaments/static/tournaments/css/style.css | 2 +- .../templates/tournaments/broadcasted_matches.html | 10 +++++----- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/padelclub_backend/settings.py b/padelclub_backend/settings.py index dad300a..2e14c53 100644 --- a/padelclub_backend/settings.py +++ b/padelclub_backend/settings.py @@ -109,10 +109,10 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/4.1/topics/i18n/ -LANGUAGES = [ - ('fr', 'French'), - ('en', 'English'), -] +# LANGUAGES = [ +# ('fr', 'French'), +# ('en', 'English'), +# ] LANGUAGE_CODE = 'fr' @@ -122,6 +122,7 @@ USE_I18N = True USE_TZ = True +USE_L10N = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.1/howto/static-files/ diff --git a/tournaments/models/match.py b/tournaments/models/match.py index ba621d7..d75ebf7 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -106,7 +106,7 @@ class Match(models.Model): # return (timezone.now() - self.start_date).total_seconds() def live_match(self): - title = self.name + title = self.name if self.name else self.backup_name() date = self.formatted_start_date() duration = self.time_indication() court = "" diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index ca42b1d..3948aab 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -76,7 +76,7 @@ class Tournament(models.Model): matches.append(match) matches = [m for m in matches if m.broadcasted==True] - matches = [m for m in matches if len(m.team_scores.all()) > 0] + # matches = [m for m in matches if len(m.team_scores.all()) > 0] matches.sort(key=lambda m: m.order) return map(lambda match: match.live_match(), matches) diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css index 770265f..f924520 100644 --- a/tournaments/static/tournaments/css/style.css +++ b/tournaments/static/tournaments/css/style.css @@ -351,7 +351,7 @@ tr { .flex-row { display: flex; justify-content: space-between; - /* height: 29px; */ + height: 29px; align-items: center; /* vertical-align: middle; */ } diff --git a/tournaments/templates/tournaments/broadcasted_matches.html b/tournaments/templates/tournaments/broadcasted_matches.html index 2d05116..c632674 100644 --- a/tournaments/templates/tournaments/broadcasted_matches.html +++ b/tournaments/templates/tournaments/broadcasted_matches.html @@ -37,7 +37,7 @@ setInterval(() => { this.retrieveMatches() this.active = this.active === this.paginatedMatches.length ? 1 : this.active+1 - }, 30000) + }, 15000) } }" x-init="loop()"> @@ -78,15 +78,15 @@