📜  django 删除会话 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:06.002000             🧑  作者: Mango

代码示例1
def logout(request):
    try:
        del request.session['member_id']
    except KeyError:
        pass
    return HttpResponse("You're logged out.")