1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #11555 -- Made SessionBase.session_key read-only. Cleaned up code slightly. Refs #13478.

This also removes the implicit initialization of the session key on the first access in favor of explicit initialization.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin
2011-11-27 17:52:24 +00:00
parent fb7ab7730d
commit bda21e2b9d
8 changed files with 59 additions and 45 deletions

View File

@@ -14,13 +14,13 @@ class SessionStore(SessionBase):
return False
def create(self):
self.session_key = self.encode({})
self._session_key = self.encode({})
def save(self, must_create=False):
self.session_key = self.encode(self._session)
self._session_key = self.encode(self._session)
def delete(self, session_key=None):
self.session_key = self.encode({})
self._session_key = self.encode({})
def load(self):
try: