Ejemplo n.º 1
0
def index():
    from datetime import datetime
    from wafwfy.models import Iteration
    from wafwfy.helpers import calculate_team_percentages

    today = datetime.now()
    velocity = Iteration.get_current_velocity()
    completed, total = Iteration.get_current_points()
    strength = float(Iteration.get_current_strength())
    team_percentages = calculate_team_percentages(strength)

    return render_template('index.html',
        epics=app.config.get('EPICS').keys(),
        day=today.day,
        month=today.strftime("%B"),
        velocity=velocity,
        team_strength=team_percentages,
        completed_points=completed,
        total_points=int(velocity * strength),
    )