Django

Code

Changeset 816

Show
Ignore:
Timestamp:
10/09/05 05:57:05 (3 years ago)
Author:
hugo
Message:

i18n: I18NMiddleware now patches the Vary response header

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/i18n/django/middleware/locale.py

    r744 r816  
    11"this is the locale selecting middleware that will look at accept headers" 
    22 
     3from django.utils.cache import patch_vary_headers 
    34from django.utils import translation 
    45 
     
    3940        translation.activate(app, lang) 
    4041 
     42    def process_response(self, request, response): 
     43        patch_vary_headers(response, ('Accept-Language',)) 
     44        return response 
     45