Skip to content

Instantly share code, notes, and snippets.

View LibertysYarn's full-sized avatar

Liberty LibertysYarn

View GitHub Profile
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(