Python-diango-cookie & session
views视图内设置session :
request.session['username']='S1700622'
views视图内取session:
print(request.session['username'])
html 网页内取session:
<h3>session: {{request.session.username}}</h3>
views视图内设置session :
request.session['username']='S1700622'
views视图内取session:
print(request.session['username'])
html 网页内取session:
<h3>session: {{request.session.username}}</h3>