def rest_depth(request, project_id, depth, from_commit = None): pool = GoProjectSCMPool(settings.GOLANG_REPOS) res = pool.fetch_depth(project_id, depth, from_commit) return HttpResponse(json.dumps(res), content_type='application/json')
def graph_depth(request, project_id, depth, from_commit = None, type = None): pool = GoProjectSCMPool(settings.GOLANG_REPOS) com = pool.fetch_depth(project_id, depth, from_commit) com.reverse() return HttpResponse(makeSVG(pool.get_project(project_id).full_name, com, type), content_type='image/svg+xml')