def coverage(request):
    all_model_list = get_coverage_data()
    return render_to_response('linkcheck/coverage.html',{
            'all_model_list': all_model_list, 
        },
        RequestContext(request),
    )
Esempio n. 2
0
def coverage(request):
    all_model_list = get_coverage_data()
    return render_to_response(
        'linkcheck/coverage.html',
        {
            'all_model_list': all_model_list,
        },
        RequestContext(request),
    )
def coverage(request):

    coverage_data = get_coverage_data()

    if request.GET.get('config', False):
        # Just render the suggested linklist code
        template = 'linkcheck/suggested_configs.html'
        context = {'coverage_data': [x['suggested_config'] for x in coverage_data]}
    else:
        # Render a nice report
        template = 'linkcheck/coverage.html'
        context = {'coverage_data': coverage_data}

    return render(request, template, context)