From 928832d6e03c8e1b86c9fcf2b4819c0625c920d0 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 22 Aug 2005 19:19:54 +0000 Subject: [PATCH] Changed SessionMiddleware to use process_request instead of process_view -- that way it always gets called, even for 404s git-svn-id: http://code.djangoproject.com/svn/django/trunk@545 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/middleware/common.py | 3 --- django/middleware/sessions.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/django/middleware/common.py b/django/middleware/common.py index 75af3d07b7..295855d73e 100644 --- a/django/middleware/common.py +++ b/django/middleware/common.py @@ -22,9 +22,6 @@ class CommonMiddleware: - Flat files: for 404 responses, a flat file matching the given path will be looked up and used if found. - - You probably want the CommonMiddleware object to the first entry in your - MIDDLEWARE_CLASSES setting; """ def process_request(self, request): diff --git a/django/middleware/sessions.py b/django/middleware/sessions.py index 614db5d0a8..4162736a79 100644 --- a/django/middleware/sessions.py +++ b/django/middleware/sessions.py @@ -52,7 +52,7 @@ class SessionWrapper(object): _session = property(_get_session) class SessionMiddleware: - def process_view(self, request, view_func, param_dict): + def process_request(self, request): request.session = SessionWrapper(request.COOKIES.get(SESSION_COOKIE_NAME, None)) def process_response(self, request, response):