예제 #1
0
    def init_group_game(self, game):
        """Create game if not exists."""

        group = self.init_group(game['group'], Fifa2014().groupstage)
        game_stored = SingleGame.all().filter('fifaId =',
                                              int(game['id'])).get()
        if game_stored is None:
            game_stored = SingleGame(fifaId=int(game['id']), group=group)
        game_stored.time = game['time']
        game_stored.location = game['location']
        game_stored.group_ref = group
        game_stored.homeTeam_ref = self.init_team(game['home_team'])
        game_stored.awayTeam_ref = self.init_team(game['away_team'])
        game_stored.put()
예제 #2
0
파일: uefa2012.py 프로젝트: xczimi/xpool
    def init_group_game(self, game):
        """Create game if not exists."""

        group = self.init_group(game['group'],Uefa2012().groupstage)
        game_stored = SingleGame.all().filter('fifaId =',int(game['id'])).get()
        if game_stored is None:
            game_stored = SingleGame(fifaId=int(game['id']),group = group)
        game_stored.time = game['time']
        game_stored.location = game['location']
        game_stored.group_ref = group
        game_stored.homeTeam_ref = self.init_team(game['home_team'])
        game_stored.awayTeam_ref = self.init_team(game['away_team'])
        game_stored.put()
예제 #3
0
    def init_ko_game(self, game):
        """Create ko game if not exists."""
        group = self.init_group(game['group'], Fifa2014().kostage)
        kogroup = self.init_group('KO ' + game['id'], group)

        game_stored = SingleGame.all().filter('fifaId =',
                                              int(game['id'])).get()
        if game_stored is None:
            game_stored = SingleGame(fifaId=int(game['id']), group=kogroup)
        game_stored.time = game['time']
        game_stored.location = game['location']
        game_stored.group_ref = kogroup
        game_stored.put()
예제 #4
0
파일: fifa2010.py 프로젝트: xczimi/xpool
    def init_ko_game(self, game):
        """Create ko game if not exists."""
        group = self.init_group(game['group'],Fifa2010().kostage)
        kogroup = self.init_group('KO ' + game['id'], group)

        game_stored = SingleGame.all().filter('fifaId =',int(game['id'])).get()
        if game_stored is None:
            game_stored = SingleGame(fifaId = int(game['id']), group = kogroup)
        game_stored.time = game['time']
        game_stored.location = game['location']
        game_stored.group_ref = kogroup
        game_stored.put()