How do I pass a Flask table cell value to python function?

Solution 1

   {% for record in records %}
   
      {{ record.id }}
      {{ record.contractor }}
      {{ record.category }}
      {{ record.phone }}
   
   {% endfor %}

Solution 2
@app.route('/classify', methods=['GET','POST'])
# these requests trigger the getresponse function where data can be retrieved
def getresponse():
    if request.method == 'GET':
        return(render_template('main.html'))

    if request.method == 'POST':
        extracted_title = request.form['string']
@app.route('/detail/', methods=['GET'])
def search_results(id):
    records = db.session.query(Feedback).filter(Feedback.id == id)
    print('search')
    for record in records:
        print(record)
    return render_template('pageDetail.html', records=records)