def selectTitle() : loggedEmail = request.cookies.get("loggedEmail") expectedOutput = request.form["expectedOutput"] deadline = request.form["deadline"] taskRaw = request.form.getlist("task") if len(taskRaw)>0 : tasks = commaSeparatedListString(taskRaw) saveStep(loggedEmail, STEP_TITLE, deadline, tasks, expectedOutput) # sdate = datetime.date.today()+datetime.timedelta(days=1) return redirect( url_for('homeUser', **request.args, selectedTitle="Project Management System",) )
def userThird() : loggedEmail = request.cookies.get("loggedEmail") notiList, newNotiNo = notiMiddleware(loggedEmail) if request.method == 'GET': loggedEmail = request.cookies.get("loggedEmail") thesis = fetchThesisWithEmail(loggedEmail) step = fetchStepByEmailStep(loggedEmail, STEP_THIRD) stepNo = fetchStepNoByEmailStep(loggedEmail) prevStep = fetchStepByEmailStep(loggedEmail, STEP_SECOND) sdate = prevStep.deadline+datetime.timedelta(days=1) if prevStep else None return render_template('homeUser.html', **request.args, step=step, thesis=thesis, stepNo=stepNo, sdate=sdate, newNotiNo=newNotiNo) else : deadline = request.form["deadline"] taskRaw = request.form.getlist("task") if len(taskRaw)>0 : tasks = commaSeparatedListString(taskRaw) saveStep(loggedEmail, STEP_THIRD, deadline, tasks, "") return redirect("/userThird")