def view_scratches(request, judge_id):
    try:
        judge_id = int(judge_id)
    except __HOLE__:
        return render_to_response('error.html', 
                                 {'error_type': "Scratch",'error_name': "Delete",
                                  'error_info':"I require INTEGERS!"}, 
                                  context_instance=RequestContext(request))
    scratches = Scratch.objects.filter(judge=judge_id)
    judge = Judge.objects.get(pk=judge_id)
    number_scratches = len(scratches)
    if request.method == 'POST':
        forms = [ScratchForm(request.POST, prefix=str(i),instance=scratches[i-1]) for i in range(1,number_scratches+1)]
        all_good = True
        for form in forms:
            all_good = all_good and form.is_valid()
        if all_good:
            for form in forms:
                form.save()
            return render_to_response('thanks.html', 
                                     {'data_type': "Scratches for judge",
                                      'data_name': "["+str(judge_id)+"]",
                                      'data_modification': "EDITED"},
                                      context_instance=RequestContext(request))  
    else:
        forms = [ScratchForm(prefix=str(i), instance=scratches[i-1]) for i in range(1,len(scratches)+1)]
    
    delete_links = ["/judge/"+str(judge_id)+"/scratches/delete/"+str(scratches[i].id) for i in range(len(scratches))]
    links = [('/judge/'+str(judge_id)+'/scratches/add/1/','Add Scratch',False)]

    return render_to_response('data_entry_multiple.html', 
                             {'forms': zip(forms,delete_links),
                              'data_type':'Scratch',
                              'links':links,
                              'title':"Viewing Scratch Information for %s"%(judge.name)}, 
                              context_instance=RequestContext(request))
dataset/ETHPy150Open jolynch/mit-tab/mittab/apps/tab/judge_views.py/view_scratches