

def post(self):
    form = NewAppointmentForm(request.form)
    if form.validate():
        from tasks import send_sms_reminder
        appt = Appointment(**form.data)
        appt.time = arrow.get(appt.time, appt.timezone).to('utc').naive
        reminders.db.session.add(appt)
        reminders.db.session.commit()
        send_sms_reminder.apply_async(args=[form.id], eta=appt.get_notification_time())
        return redirect(url_for('appointment.index'), code=303)
    else:
        return (render_template('appointments/new.html', form=form), 400)

dataset/ETHPy150Open TwilioDevEd/appointment-reminders-flask/views/appointment.py AppointmentResourceCreate.post/VarMisuse@95/120 `appt`->`form`