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
【Django用户登录中出现403问题的解决】
return render(request,'index.html')
推荐阅读
- django-前后端交互
- 编写字典程序
- 精细化的思考
- 用科学的思维做最好的自己
- cocosbcx白皮书解读(一)|cocosbcx白皮书解读(一)| 区块链如何统一开发者、发行商、用户之间的利益
- java|java b2b2c shop 多用户商城系统源码- config 修改配置
- django2.2|django2.2 一般项目步骤(初步)
- 借呗用户被银行拉黑贷不到款(马云(怪我咯?))
- 抓住外部用户的心智
- 运维|Linux 禁止用户或 IP通过 SSH 登录