用户登录状态记录cookie被禁用 怎么保存在html中,用cookie存储保存状态,状态提示...

1.list中(organization_file_manage):

error_content = request.COOKIES.get()

error_type = request.COOKIES.get()

response = render_to_response(

{'error_content': error_content,

'error_type': error_type})

request.COOKIES:

response.delete_cookie()

request.COOKIES:

response.delete_cookie()

2.页面中(organization/organization_files_manage.html):

%if error_content is not None and error_content is not undefined and len(error_content)>0:

%if error_type is None or error_type is undefined or len(error_type) <= 0:

%endif

if(!$.jBox.tip.mess){

$.jBox.tip.mess = 1;

$.jBox.tip("${error_content}","${error_type}", {persistent:true, opacity:0});

$.jBox.tip.mess = 0;

}

%endif

3.在后台保存时(organization_file_save):

response_redirect = HttpResponseRedirect(

reverse())

response_redirect.set_cookie()

response_redirect.set_cookie()

response_redirect

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值