views.py 文件源码

python
阅读 47 收藏 0 点赞 0 评论 0

项目:RobotFrameworkReporter 作者: ivanitskiy 项目源码 文件源码
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})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号