qiaoqinqie 发表于 2013-2-7 15:16:17

Django用户登录中出现403问题的解决

在注销登录完以后,要把RequestContext传出去,这样才会有效果,不然会引发403
即使页面加了tag。
有问题的登出


def logout(request):    user_logout(request)    return render_to_response('index.html')     正确的代码

return render_to_response('index.html',context_instanse=RequestContext(request)) 或者用django1.3新增的render

return render(request,'index.html')
页: [1]
查看完整版本: Django用户登录中出现403问题的解决