Add page/route to display workouts for a selected person
This commit is contained in:
7
app.py
7
app.py
@@ -22,12 +22,17 @@ def query_db(query, args=(), one=False):
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def hello_world():
|
||||
def home_page():
|
||||
rows = query_db('select * from TopSet')
|
||||
print(rows[0]['TopSetId'])
|
||||
return render_template('index.html', name='peter')
|
||||
|
||||
|
||||
@app.route("/person/<int:person_id>")
|
||||
def display_workouts_for_person(person_id):
|
||||
return render_template('workouts.html', name='peter')
|
||||
|
||||
|
||||
@app.teardown_appcontext
|
||||
def close_connection(exception):
|
||||
db = getattr(g, '_database', None)
|
||||
|
||||
Reference in New Issue
Block a user