In HTML I can link directly to a specific location on a page, assuming there's an element with the given id:
<a href="http://www.example.com/stuff.html#exactlocation">Go there</a>
In Flask I tried to add the anchor to render_template
but I get jinja2.exceptions.TemplateNotFound: stuff.html#exactlocation
.
@main.route('/exactlocation')
def exactlocation():
return render_template('stuff.html#exactlocation')
How do I link to a specific location in a template?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…