Example #1
0
def state():
    date = datetime.datetime.now()
    date = make_end_date(date=date)
    states = States()

    board = DisplayBoard(backlog_limit=0)  # defaults to all teams, 7 days of done
    board.cards  # force the card calculation
    board.rows

    title = app.config.get('SITE_NAME')

    metrics = []

    teams = teams_service.setup_teams(
        app.config
    )

    context = {
        'title': title,
        'board': board,
        'states': states,
        'metrics': metrics,
        'wip_limits': {},
        'date': date,
        'teams': teams,
        'updated_at': datetime.datetime.now(),
        'version': VERSION,
    }
    return render_template('state.html', **context)
Example #2
0
def state():
    date = datetime.datetime.now()
    date = make_end_date(date=date)
    states = States()

    board = DisplayBoard(backlog_limit=0)  # defaults to all teams, 7 days of done
    board.cards  # force the card calculation
    board.rows

    title = app.config.get("SITE_NAME")

    metrics = []

    teams = teams_service.setup_teams(app.config)

    context = {
        "title": title,
        "board": board,
        "states": states,
        "metrics": metrics,
        "wip_limits": {},
        "date": date,
        "teams": teams,
        "updated_at": datetime.datetime.now(),
        "version": VERSION,
    }
    return render_template("state.html", **context)
Example #3
0
def state():
    date = datetime.datetime.now()
    date = make_end_date(date=date)
    states = States()

    board = DisplayBoard(backlog_limit=0)  # defaults to all teams, 7 days of done
    board.cards  # force the card calculation
    board.rows

    title = app.config.get('SITE_NAME')

    metrics = []

    teams = teams_service.setup_teams(
        app.config
    )

    context = {
        'title': title,
        'board': board,
        'states': states,
        'metrics': metrics,
        'date': date,
        'teams': teams,
        'updated_at': datetime.datetime.now(),
        'version': VERSION,
    }
    return render_template('team.html', **context)
Example #4
0
def _get_team(team_name):
    teams = team_service.setup_teams(app.config)
    try:
        team = teams.find_by_name(team_name)
    except ValueError:
        print "%s not in %s" % (team_name, teams)
        raise
    return team
Example #5
0
    def __init__(self, teams=None, done_days=7, backlog_limit=None):
        self.states = States()
        self.done_days = done_days
        self._cards = None
        self._rows = []
        self.backlog_limit = backlog_limit

        from kardboard.services import teams as teams_service
        if teams is None:
            teams = teams_service.setup_teams(app.config).names
        self.teams = teams
Example #6
0
    def __init__(self, teams=None, done_days=7, backlog_limit=None):
        self.states = States()
        self.done_days = done_days
        self._cards = None
        self._rows = []
        self.backlog_limit = backlog_limit

        from kardboard.services import teams as teams_service
        if teams is None:
            teams = teams_service.setup_teams(app.config).names
        self.teams = teams
Example #7
0
def state():
    title = app.config.get('SITE_NAME')

    teams = teams_service.setup_teams(app.config)

    context = {
        'title': title,
        'teams': teams,
        'updated_at': datetime.datetime.now(),
        'version': VERSION,
    }
    return render_template('state.html', **context)
Example #8
0
def state():
    title = app.config.get('SITE_NAME')

    teams = teams_service.setup_teams(
        app.config
    )

    context = {
        'title': title,
        'teams': teams,
        'updated_at': datetime.datetime.now(),
        'version': VERSION,
    }
    return render_template('state.html', **context)
Example #9
0
def _init_card_form(*args, **kwargs):
    states = States()
    new = kwargs.get('new', False)
    if new:
        del kwargs['new']
    klass = get_card_form(new=new)
    f = klass(*args, **kwargs)

    if states:
        f.state.choices = states.for_forms

    teams = teams_service.setup_teams(app.config)
    if teams:
        f.team.choices = _make_choice_field_ready(teams.names)

    return f
Example #10
0
def _init_card_form(*args, **kwargs):
    states = States()
    new = kwargs.get("new", False)
    if new:
        del kwargs["new"]
    klass = get_card_form(new=new)
    f = klass(*args, **kwargs)

    if states:
        f.state.choices = states.for_forms

    teams = teams_service.setup_teams(app.config)
    if teams:
        f.team.choices = _make_choice_field_ready(teams.names)

    return f
Example #11
0
def _get_team(team_name):
    teams = team_service.setup_teams(app.config)
    team = teams.find_by_name(team_name)
    return team
Example #12
0
def _get_teams():
    teams = teams_service.setup_teams(app.config)
    return teams
Example #13
0
def _get_team(team_name):
    teams = team_service.setup_teams(app.config)
    team = teams.find_by_name(team_name)
    return team
Example #14
0
def _get_teams():
    teams = teams_service.setup_teams(app.config)
    return teams