我有一个视图,我从表单中获取数据并使用它在视图中运行 python 脚本。python 脚本提供了一些输出,需要提示用户继续进行并执行其他功能。
我怎样才能在一个视图中完成所有这些操作??
我的意见.py
class DeployWizard(SessionWizardView):
template = "deploy_form.html"
def done(self, form_list, **kwargs) :
form_data = process_form_data(form_list)
#process all the data form the form
#call the script with some of the the form data as argument
# display the output to the user and ask the user to proceed (something like "Yes", "No") and proceed further
# again call the python script with some other arguments
return rendor_to_response("done.html", {'form_data' : form_data})