We don't want users to keep track of the database IDs of their appointments, so we provide a view, which will list all the appointments that they have, as shown in the following screenshot:
We will continue to work from the
app.py file from the
sched directory and the
@app.route('/appointments/') def appointment_list(): """Provide HTML listing of all appointments.""" # Query: Get all Appointment objects, sorted by date. appts = (db.session.query(Appointment) .order_by(Appointment.start.asc()).all()) return render_template('appointment/index.html', ...