Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route('/schedule',methods=['GET','POST'])
- def schedule():
- form = JobForm()
- job1_start_time = (neptune.get_schedule_by_zone_job('zone1', '1')[0][4])
- form.start_hour_job1 = job1_start_time.hour
- form.start_minute_job1 = job1_start_time.minute
- if form.validate_on_submit():
- print(form.data)
- start_time = datetime.strptime(form.start_hour_job1.data + ':' + form.start_minute_job1.data + ':00', '%H:%M:%S').time()
- print(start_time)
- return render_template("success_test.html", data=form.data, start_time = start_time)
- else:
- print("Validation Failed")
- print(form.errors)
- return render_template('schedule.html',form = form)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement