Django

Code

Changeset 545

Show
Ignore:
Timestamp:
08/22/05 14:19:54 (3 years ago)
Author:
adrian
Message:

Changed SessionMiddleware? to use process_request instead of process_view -- that way it always gets called, even for 404s

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/middleware/common.py

    r513 r545  
    2323        - Flat files: for 404 responses, a flat file matching the given path 
    2424          will be looked up and used if found. 
    25  
    26     You probably want the CommonMiddleware object to the first entry in your 
    27     MIDDLEWARE_CLASSES setting; 
    2825    """ 
    2926 
  • django/trunk/django/middleware/sessions.py

    r536 r545  
    5353 
    5454class SessionMiddleware: 
    55     def process_view(self, request, view_func, param_dict): 
     55    def process_request(self, request): 
    5656        request.session = SessionWrapper(request.COOKIES.get(SESSION_COOKIE_NAME, None)) 
    5757