Now we provide an edit page for existing appointments, as shown in the following screenshot:
We will continue to work from the
app.py file from the
sched directory and
@app.route('/appointments/ <int:appointment_id>/edit/, methods=['GET', 'POST']) def appointment_edit(appointment_id): """Provide HTML form to edit a given appointment.""" appt = db.session.query(Appointment).get(appointment_id) if appt is None: abort(404) form = AppointmentForm(request.form, ...