Browse files

Fixed imports, indention, and a long line.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 48ce845 commit a7a6a1b75d985d1c9c65d935761066238e0ca9fd @gdub gdub committed Oct 29, 2007
Showing with 7 additions and 5 deletions.
  1. +7 −5 django/contrib/sessions/middleware.py
View
12 django/contrib/sessions/middleware.py
@@ -1,17 +1,19 @@
+import time
+import datetime
+from email.Utils import formatdate
+
from django.conf import settings
from django.utils.cache import patch_vary_headers
-from email.Utils import formatdate
-import datetime
-import time
TEST_COOKIE_NAME = 'testcookie'
TEST_COOKIE_VALUE = 'worked'
class SessionMiddleware(object):
def process_request(self, request):
- engine = __import__(settings.SESSION_ENGINE, {}, {}, [''])
- request.session = engine.SessionStore(request.COOKIES.get(settings.SESSION_COOKIE_NAME, None))
+ engine = __import__(settings.SESSION_ENGINE, {}, {}, [''])
+ session_key = request.COOKIES.get(settings.SESSION_COOKIE_NAME, None)
+ request.session = engine.SessionStore(session_key)
def process_response(self, request, response):
# If request.session was modified, or if response.session was set, save

0 comments on commit a7a6a1b

Please sign in to comment.