diff --git a/game_event/models.py b/game_event/models.py index 8ff5418..23d502d 100644 --- a/game_event/models.py +++ b/game_event/models.py @@ -51,3 +51,9 @@ def validate_game_event(court, ball_game, min_number_of_players, max_number_of_p @staticmethod def is_ball_game_playable_at_court(court, ball_game): return CourtBallGame.is_ball_game_playable(court, ball_game) + + def is_event_full(self): + from game_event_player.models import GameEventPlayer + + current_players = GameEventPlayer.objects.filter(game_event=self).count() + return current_players == self.max_number_of_players diff --git a/game_event/templates/game_event/game-event.html b/game_event/templates/game_event/game-event.html index 3a72511..44382eb 100644 --- a/game_event/templates/game_event/game-event.html +++ b/game_event/templates/game_event/game-event.html @@ -2,32 +2,49 @@ {% block content %} {% load static %} + -
+ -Time: {{ time }}
-Level: {{ level_of_game }}
-Min Players: {{ min_number_of_players }}
-Max Players: {{ max_number_of_players }}
-Court: {{ court }} {{ neighborhood }}
-Game: {{ ball_game }}
-