For some reason, doing {{ request.session.session_key }}
in the template gives me a None
value. After some searching, came across this post that mentioned using request.session._session_id
but using that in the template gives me an error:
Variables and attributes may not begin with underscores: 'request.session._session_key'
My understanding of sessions in Django is that the moment a user loads a page (any page), even if he is anonymous, a session_id is assigned to that particular session. Is my understanding wrong and also, is this where using [SESSION_SAVE_EVERY_REQUEST]
is supposed to come in?
I'm using database backend as my session store.