Skip to content

Instantly share code, notes, and snippets.

View tarkatronic's full-sized avatar

Joey Wilhelm tarkatronic

View GitHub Profile
@tarkatronic
tarkatronic / redis_session_backend.py
Created August 14, 2012 16:23 — forked from mikeyk/redis_session_backend.py
A redis backend for Django Sessions, tested on Django 1.3+
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(