myapp.py 文件源码

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

项目:sanic-motor 作者: lixxu 项目源码 文件源码
def destroy(request, id):
    user = await User.find_one(id)
    if not user:
        request['flash']('User not found', 'error')
        return redirect(app.url_for('index'))

    await user.destroy()
    request['flash']('User was deleted successfully', 'success')
    return redirect(app.url_for('index'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号