Пример #1
0
    def GET(self, id_tournament):
        # Returns players already register in a tournament
        playersTournaments = trn.reportPlayersTournaments(id_tournament)
        # Returns the number of players already register in a tournament
        numberPlayerInTournament = trn.numberPlayerInTournament(id_tournament)
        # Returns the number of players allowed by tournament
        numberPlayerByTournament = trn.numberPlayerByTournament(id_tournament)

        return render.players_tournament(
            id_tournament, playersTournaments, numberPlayerInTournament, numberPlayerByTournament
        )
Пример #2
0
    def GET(self, id_tournament):
        form = self.form()
        # Returns players already register in a tournament
        playersTournaments = trn.reportPlayersTournaments(id_tournament)
        # Returns the number of players already register in a tournament
        numberPlayerInTournament = trn.numberPlayerInTournament(id_tournament)
        # Returns the number of players allowed by tournament
        numberPlayerByTournament = trn.numberPlayerByTournament(id_tournament)

        if int(numberPlayerInTournament) == int(numberPlayerByTournament):
            return render.init_tournament(form, id_tournament, "True")
        else:
            return render.init_tournament(form, id_tournament, "False")