Skip to content
Snippets Groups Projects
Commit 5cdb8d5a authored by Pekka Harjamäki's avatar Pekka Harjamäki
Browse files

Added fix for session library

parent b765b871
No related branches found
No related tags found
No related merge requests found
import django.contrib.sessions.backends.db as db
#import random
#import string
class SessionStore(db.SessionStore):
......@@ -7,6 +9,7 @@ class SessionStore(db.SessionStore):
def _get_new_session_key(self):
while True:
session_key = 'session-' + str(SessionStore.session_counter)
# session_key = 'session-'+''.join(random.choices(string.ascii_uppercase + string.digits, k=15))
SessionStore.session_counter += 1
if not self.exists(session_key):
return session_key
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment