# 创建或修改 session:
request.session[key]
=
value
# 获取 session:
request.session.get(key,default
=
None
)
# 删除 session
del
request.session[key]
# 不存在时报错
# 创建或修改 session:
request.session[key]
=
value
# 获取 session:
request.session.get(key,default
=
None
)
# 删除 session
del
request.session[key]
# 不存在时报错