When browser firstly request the server, the django will generate a session obj and then write a set cookie header to set session id into response as a cookie. My question is how to get this newly generated sess id without access request.COOKIES, just be aware that at this moment, client didnt know the sessid since the 1st response has not been sent out yet. Thanks.
When browser firstly request the server, the django will generate a session obj and
Share
Try
If it doesn’t work do
request.session.save()before