def compute_scores(self, week): for lgconf in fanfoot.leagues().itervalues(): for team in self.teams(lgconf): players = self.roster(lgconf, week, team.id, bench=True) if not players: continue for p in players: self.add_score(lgconf, week, p)
def find_league(label): for league in fanfoot.leagues().itervalues(): if league.label == label: return league bottle.abort(404, 'Could not find league "%s".' % label)
def home(): leagues = fanfoot.leagues().values() return dict(title='Home', leagues=leagues)