I'm aware that you can get session variables using request.session['variable_name']
, but there doesn't seem to be a way to grab the sessionid as a variable in a similar way. Is this documented anywhere? I can't find it. Thanks for your help!
views:
1311answers:
3
+4
A:
Django sessions save their key in a cookie. At least its middleware extracts it like this:
from django.conf import settings
session_key = request.COOKIES[settings.SESSION_COOKIE_NAME]
che
2009-02-08 18:41:29