@app.route('/detail/<question_id>')
def detail(question_id):
quest =
return render_template('detail.html', ques = quest)
{{ ques.title}}
{{ ques.id }}{{ ques.creat_time }}
{{ ques.author.username }}
{{ ques.detail }}
1 @app.route('/detail/<question_id>') 2 def detail(question_id): 3 quest = Question.query.filter(Question.id == question_id).first() 4 return render_template('detail.html',ques = quest)1 <a href="{{ url_for('detail',question_id = foo.id) }}">{{ foo.title }}</a>