Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
def home():
    leagues = fanfoot.leagues().values()
    return dict(title='Home', leagues=leagues)