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
This commit is contained in:
parent
601a892ea0
commit
928832d6e0
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue