Add WIP of exercise live search, just testing speed in prod site
This commit is contained in:
7
app.py
7
app.py
@@ -438,6 +438,13 @@ def show_workout(person_id, workout_id):
|
||||
view_model = db.workout.get(person_id, workout_id)
|
||||
return render_template('workout.html', **view_model)
|
||||
|
||||
@app.route("/exercises/get")
|
||||
def get_exercises():
|
||||
query = request.args.get('query')
|
||||
exercises = db.exercises.get(query)
|
||||
return render_template('partials/exercise_dropdown.html', exercises=exercises)
|
||||
|
||||
|
||||
|
||||
@app.teardown_appcontext
|
||||
def closeConnection(exception):
|
||||
|
||||
Reference in New Issue
Block a user