def enter_debater(request):
    if request.method == 'POST':
        form = DebaterForm(request.POST)
        if form.is_valid():
            try:
                form.save()
            except __HOLE__:
                return render_to_response('error.html', 
                                         {'error_type': "Debater",'error_name': "["+form.cleaned_data['name']+"]",
                                          'error_info':"Debater name cannot be validated, most likely a duplicate debater"}, 
                                          context_instance=RequestContext(request))
            return render_to_response('thanks.html', 
                                     {'data_type': "Debater",
                                      'data_name': "["+form.cleaned_data['name']+"]",
                                      'data_modification': "CREATED",
                                      'enter_again': True}, 
                                      context_instance=RequestContext(request))
    else:
        form = DebaterForm()
    return render_to_response('data_entry.html',
                             {'form': form,
                              'title': "Create Debater:"},
                              context_instance=RequestContext(request))
dataset/ETHPy150Open jolynch/mit-tab/mittab/apps/tab/debater_views.py/enter_debater