Changes between Version 5 and Version 6 of CookBookDualSessionMiddleware
- Timestamp:
- Nov 6, 2007, 3:17:44 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookDualSessionMiddleware
v5 v6 5 5 from django.conf import settings 6 6 from django.contrib.sessions.models import Session 7 from django.contrib.sessions.middleware import SessionWrapper8 7 from django.utils.cache import patch_vary_headers 9 8 import datetime … … 40 39 41 40 def process_request(self, request): 42 request.session = SessionWrapper(request.COOKIES.get(settings.SESSION_COOKIE_NAME, None)) 41 engine = __import__(settings.SESSION_ENGINE, {}, {}, ['']) 42 request.session = engine.SessionStore(request.COOKIES.get(settings.SESSION_COOKIE_NAME, None)) 43 43 44 44 def process_response(self, request, response):