With content going into the database, let's get it back out as shown in the following figure:
We will continue to work from the
app.py file from the
sched folder and the
# Note the import statements from the previous section. @app.route('/appointments/<int:appointment_id>/') def appointment_detail(appointment_id): """Provide HTML page with a given appointment.""" # Query: get Appointment object by ID. appt = db.session.query(Appointment).get(appointment_id) if appt is None: # Abort with Not Found. ...