我有一个代码,有一个错误,CSRF 验证失败,请求中止。通知:
<form method="POST" action="/jobb/" class="form-horizontal" id="jobform" name="jform" enctype="multipart/form-data" >{% csrf_token %}
在views.py
@csrf_exempt
def jobform(request):
if request.method == 'POST':
getintable = job(app_id = request.POST['jobid'],start_on = request.POST['starton'], end_on = request.POST['endon'],timeframe = request.POST['timeframe'],odeskid = request.POST['odeskid'],hourlyrate = request.POST['hourlyrate'],assigne = request.POST['assigne'],clientid = request.POST['clientid'])
getintable.save()
return render_to_response('jobsform.html')
else:
return render_to_response('interviewform.html')