Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit a7a6a1b75d985d1c9c65d935761066238e0ca9fd 1 parent 48ce845
Gary Wilson Jr. gdub authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 django/contrib/sessions/middleware.py
12 django/contrib/sessions/middleware.py
View
@@ -1,8 +1,9 @@
+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'
@@ -10,8 +11,9 @@
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
Please sign in to comment.
Something went wrong with that request. Please try again.