views.py 文件源码

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

项目:BioQueue 作者: liyao001 项目源码 文件源码
def get_learning_result(request):
    if request.method == 'GET':
        learning_form = QueryLearningForm(request.GET)
        if learning_form.is_valid():
            cd = learning_form.cleaned_data
            try:
                train = Prediction.objects.get(step_hash=cd['stephash'], type=cd['type'])
                template = loader.get_template('ui/get_learning_result.html')
                context = {
                    'hit': train,
                }
                return success(template.render(context))
            except Exception as e:
                return error(e)
        else:
            return error(str(learning_form.errors))
    else:
        return error('Error Method.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号