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.')
评论列表
文章目录