1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

i18n: I18NMiddleware now patches the Vary response header

git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-10-09 10:57:05 +00:00
parent eb7ebb777c
commit 3f5bb5fa53

View File

@ -1,5 +1,6 @@
"this is the locale selecting middleware that will look at accept headers"
from django.utils.cache import patch_vary_headers
from django.utils import translation
# this is a cache that will build a map from modules to applications
@ -38,3 +39,7 @@ class LocaleMiddleware:
translation.activate(app, lang)
def process_response(self, request, response):
patch_vary_headers(response, ('Accept-Language',))
return response