def upload_output_xml(request):
if request.method == 'POST':
form = UploadOutputXmlForm(request.POST, request.FILES)
print "HELLP"
if form.is_valid():
print "YES"
try:
handle_uploaded_file(request)
except:
tt, value, tb = sys.exc_info()
print {'exception_value': value,
'value': tt,
'tb': traceback.format_exception(tt, value, tb)}
return handler500(request)
return HttpResponseRedirect(reverse('home'))
else:
return handler500(request)
else:
print "No"
form = UploadOutputXmlForm()
return render(request, 'report/upload_xml_file.html', {'form': form})
评论列表
文章目录