diff --git a/padelclub_backend/settings.py b/padelclub_backend/settings.py index bd4b5fe..955744f 100644 --- a/padelclub_backend/settings.py +++ b/padelclub_backend/settings.py @@ -111,7 +111,7 @@ AUTH_PASSWORD_VALIDATORS = [ LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Europe/Paris' USE_I18N = True diff --git a/tournaments/migrations/0019_alter_match_index.py b/tournaments/migrations/0019_alter_match_index.py new file mode 100644 index 0000000..d174264 --- /dev/null +++ b/tournaments/migrations/0019_alter_match_index.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-03-12 09:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournaments', '0018_rename_date_event_creation_date_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='match', + name='index', + field=models.IntegerField(default=0), + ), + ] diff --git a/tournaments/models/event.py b/tournaments/models/event.py index 7172e1a..84d30ae 100644 --- a/tournaments/models/event.py +++ b/tournaments/models/event.py @@ -15,7 +15,7 @@ class Event(models.Model): loser_round_format = models.IntegerField(default=FederalMatchCategory.NINE_GAMES, choices=FederalMatchCategory.choices, null=True, blank=True) def __str__(self): - return self.name + return self.display_name() def display_name(self): if self.name: diff --git a/tournaments/models/match.py b/tournaments/models/match.py index 515b8bd..2c11f6d 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -9,7 +9,7 @@ class Match(models.Model): group_stage = models.ForeignKey(GroupStage, null=True, blank=True, on_delete=models.CASCADE) start_date = models.DateTimeField(null=True, blank=True) end_date = models.DateTimeField(null=True, blank=True) - index = models.IntegerField(null=True, blank=True) + index = models.IntegerField(default=0) format = models.IntegerField(default=FederalMatchCategory.NINE_GAMES, choices=FederalMatchCategory.choices, null=True, blank=True) court = models.CharField(max_length=50, null=True, blank=True) serving_team_id = models.UUIDField(null=True, blank=True) @@ -26,6 +26,8 @@ class Match(models.Model): return f"{desc} > {player_names}" elif self.group_stage: return f"{desc} > {player_names}" + else: + return "--" def name(self): items = [] diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css index 1cd7baf..a926560 100644 --- a/tournaments/static/tournaments/css/style.css +++ b/tournaments/static/tournaments/css/style.css @@ -231,7 +231,7 @@ tr { padding: 20px; background-color: white; border-radius: 24px; - box-shadow: 0 0 10px 5px #fbead6; + box-shadow: 0 0 10px 5px #f9e7cf; } .test {