url_for_example.py 文件源码

python
阅读 14 收藏 0 点赞 0 评论 0

项目:sanic 作者: channelcat 项目源码 文件源码
def index(request):
    # generate a URL for the endpoint `post_handler`
    url = app.url_for('post_handler', post_id=5)
    # the URL is `/posts/5`, redirect to it
    return response.redirect(url)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号