def job_insert(self): if (c.userid == "false"): redirect(url('/users/login?m=1')) #extra_questions = get_questions(request) #form = UserCreationForm(request.POST or None, extra=extra_questions) if request.method == 'POST': appname = request.POST['appname'] if (appname =='tophatfusion'): c.form = tophatfusionForm(request.POST,request.POST ) elif (appname =='bfast') : c.form = bfastForm(request.POST,request.POST ) elif (appname =='chipseq') : c.form = chipseqForm(request.POST,request.POST ) if c.form.is_valid(): #add using job queue jobid =add_job(c.userid) for key in c.form.cleaned_data: print("key", key) print("value", c.form.cleaned_data[key]) newjobinfo = model.jobinfo() newjobinfo.key = key newjobinfo.value = c.form.cleaned_data[key] newjobinfo.submitted_time = time.asctime() newjobinfo.jobid = jobid add_jobinfo(newjobinfo) update_job_status(jobid, str(JOBSTATES.NEW)) redirect(url('/ngs/job_table_view?m=1&id=' + str(jobid) )) else: return render('/forms/chipseq_form.mako')
def job_insert(self): if (c.userid == "false"): redirect(url('/users/login?m=1')) #extra_questions = get_questions(request) #form = UserCreationForm(request.POST or None, extra=extra_questions) if request.method == 'POST': appname = request.POST['appname'] if (appname =='tophatfusion'): c.form = tophatfusionForm(request.POST,request.POST ) elif (appname =='bfast') : c.form = bfastForm(request.POST,request.POST ) elif (appname =='chipseq') : c.form = chipseqForm(request.POST,request.POST ) if c.form.is_valid(): #add using job queue jobid =add_job(c.userid) for key in c.form.cleaned_data: print "key", key print "value", c.form.cleaned_data[key] newjobinfo = model.jobinfo() newjobinfo.key = key newjobinfo.value = c.form.cleaned_data[key] newjobinfo.submitted_time = time.asctime() newjobinfo.jobid = jobid add_jobinfo(newjobinfo) update_job_status(jobid, str(JOBSTATES.NEW)) redirect(url('/ngs/job_table_view?m=1&id=' + str(jobid) )) else: return render('/forms/chipseq_form.mako')
def chipseq_form(self): if (c.userid == "false"): redirect(url('/users/login?m=1')) c.form = chipseqForm() return render('/forms/chipseq_form.mako')