Exemplo n.º 1
0
    def __init__(self):

        # Grid initialization
        super(EditTournamentsGrid, self).__init__(Tournament, Tournament.all(order_by_clause=Tournament.tournament_dt)) #@UndefinedVariable
        
        # Creation of a customized date field to edit the tournaments' date
        self.append(create_date_field("formatted_tournament_dt", "tournament_dt", DT_FORMAT))
        
        # Grid configuration
        inc = [SEASON_READONLY(self.season_id), POSITION_READONLY(self.position), FORMATTED_DT(self.formatted_tournament_dt), BUYIN(self.buyin)] 
        self.configure(include=inc)
Exemplo n.º 2
0
    def test_all(self):

        all_tournaments = Tournament.all()
        self.assertEqual(len(all_tournaments), 3)
Exemplo n.º 3
0
 def __init__(self):
     """Init."""
     super().__init__()
     self.title = "Choose a tournament to continue"
     self.all_tournaments = Tournament.all()
Exemplo n.º 4
0
    def test_all(self):

        all_tournaments = Tournament.all()
        self.assertEqual(len(all_tournaments), 3)