Ejemplo n.º 1
0
def milestone_tickets(milestone_id):
    values = ordered_dict_to_dict(request.args)
    values['user_id'] = session.get('user_id')
    values['milestone_id'] = milestone_id
    tickets = milestone_tickets_view()
    #return make_response(render_milestone_tickets(values))
    return make_response(tickets.render(values))
Ejemplo n.º 2
0
def json_milestones(project_id):
    top_bar_params = todict(session)
    top_bar_params.update(request.args)
    top_bar_params['ticket_count'] = get_ticket_count({'user_id': current_user.id, 'team_id': '1'}).get().get('total')
    top_bar_params['projects'] = [(project.get('id'), project.get('title')) for project in get_users_projects({'user_id': session.get('user_id')})]

    web.header.create('', top_bar_params)
    web.page.create(web.header.render())

    values = ordered_dict_to_dict(request.args)
    values['user_id'] = session.get('user_id')
    values['milestone_id'] = milestone_id
    values['project_id'] = project_id
    milestone_tickets = milestone_tickets_view()
    web.page.section(milestone_tickets.render(values))
    web.template.body.append(web.page.render())
    return make_response(web.render())