add weekday to tournament info

redesign-tournament-list
Raz 8 months ago
parent a6e3c0292d
commit 97416c54ba
  1. 4
      tournaments/models/tournament.py
  2. 2
      tournaments/views.py

@ -154,7 +154,7 @@ class Tournament(models.Model):
return self.start_date.astimezone(timezone) return self.start_date.astimezone(timezone)
def local_start_date_formatted(self): def local_start_date_formatted(self):
return formats.date_format(self.local_start_date(), format='j F Y H:i') return formats.date_format(self.local_start_date(), format='l j F Y H:i').capitalize()
def level(self): def level(self):
if self.federal_level_category == 0: if self.federal_level_category == 0:
@ -1189,7 +1189,7 @@ class Tournament(models.Model):
current_year += 1 current_year += 1
user_age = current_year - int(birth_year) user_age = current_year - int(birth_year)
print(user_age) print("user_age", user_age)
# Check age category restrictions # Check age category restrictions
if self.federal_age_category == FederalAgeCategory.A11_12 and user_age > 12: if self.federal_age_category == FederalAgeCategory.A11_12 and user_age > 12:

@ -997,7 +997,7 @@ def tournament_bracket(request, tournament_id):
if loser_final: if loser_final:
loser_matches = loser_final.match_set.all() loser_matches = loser_final.match_set.all()
if len(loser_matches) >= 1: if len(loser_matches) >= 1:
print(loser_matches[0]) print("loser_matches", loser_matches[0])
first_half_matches.append(loser_matches[0]) first_half_matches.append(loser_matches[0])

Loading…
Cancel
Save