1.设置session[‘键名’]=值
request.session['image_code']= text
2. 设置过期时间
request.session.set_expiry(60)
3.打印所有键
print(request.session.keys())
4.取键的值
print(request.session.get('image_code'))
5.取所有值
print(request.session.values())
1.设置session[‘键名’]=值
request.session['image_code']= text
2. 设置过期时间
request.session.set_expiry(60)
3.打印所有键
print(request.session.keys())
4.取键的值
print(request.session.get('image_code'))
5.取所有值
print(request.session.values())
本文标题:session
本文链接:https://www.haomeiwen.com/subject/tyuwxktx.html
网友评论