url_for(endpoint, **values):
用法
1.为动态路由传参
eg: <td><a target="_blank" href="{
{ url_for("front.post_detail",post_id=post.id) }}">{
{ post.title }}</a></td>
source:
@bp.route('/p/<post_id>/')
def post_detail(post_id):
post = PostModel.query.get(post_id)