Example #1
0
def index(request):
    name = request.GET.get('name', '')
    if name:
        name = name.replace(' ', '')
        data = _prepare_chart_data(name)
        if len(data) > 0:
            trend = _calculate_trends(data)
            is_top_20 = data[-1]['count'] > 8
            developers = ProjectDeveloper.gql("WHERE repository=:1", name)
            repo = Repository.get_by_key_name(name)
            return render_to_response(
                'project/index.html', {
                    'name': name,
                    'data': data,
                    'activity_count': len(data),
                    'trend': trend,
                    'is_top_20': is_top_20,
                    'project_developers': developers,
                    'repo': repo
                })
    project_names = _find_similar_projects(name)
    return render_to_response('project/not_found.html', {
        'name': name,
        'project_names': project_names
    })
Example #2
0
def index(request):
    name = request.GET.get('name', '')
    if name:
        name = name.strip()
        data = _prepare_chart_data(name)
        if len(data) > 0:
            is_top_20 = data[-1]['count'] > 14
            project_developers = ProjectDeveloper.gql("WHERE developer=:1", name)
            return render_to_response('people/index.html', {'name':name, 
                                                             'data':data,
                                                             'activity_count':len(data),
                                                             'is_top_20': is_top_20,
                                                             'project_developers':project_developers
                                                             })
    return render_to_response('people/not_found.html', {'name':name})
Example #3
0
def index(request):
    name = request.GET.get('name', '')
    if name:
        name = name.strip()
        data = _prepare_chart_data(name)
        if len(data) > 0:
            is_top_20 = data[-1]['count'] > 14
            project_developers = ProjectDeveloper.gql("WHERE developer=:1",
                                                      name)
            return render_to_response(
                'people/index.html', {
                    'name': name,
                    'data': data,
                    'activity_count': len(data),
                    'is_top_20': is_top_20,
                    'project_developers': project_developers
                })
    return render_to_response('people/not_found.html', {'name': name})
Example #4
0
def index(request):
    name = request.GET.get('name', '')
    if name:
        name = name.replace(' ', '')
        data = _prepare_chart_data(name)
        if len(data) > 0:
            trend = _calculate_trends(data)
            is_top_20 = data[-1]['count'] > 8
            developers = ProjectDeveloper.gql("WHERE repository=:1", name)
            repo = Repository.get_by_key_name(name)
            return render_to_response('project/index.html', {'name':name, 
                                                             'data':data,
                                                             'activity_count':len(data),
                                                             'trend':trend,
                                                             'is_top_20': is_top_20,
                                                             'project_developers':developers,
                                                             'repo':repo
                                                             })
    project_names = _find_similar_projects(name)
    return render_to_response('project/not_found.html', {'name':name, 'project_names':project_names})