Пример #1
0
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')
Пример #2
0
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')