Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3785 from mozilla/1237661-admin
Browse files Browse the repository at this point in the history
Fix bug 1237661: Fix wonky admin
  • Loading branch information
willkg committed Feb 17, 2016
2 parents ecb07f0 + c10ae65 commit 67bb93d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kuma/core/middleware.py
Expand Up @@ -55,7 +55,10 @@ def process_request(self, request):

request.path_info = '/' + prefixer.shortened_path
request.LANGUAGE_CODE = prefixer.locale or settings.LANGUAGE_CODE
translation.activate(prefixer.locale)
# prefixer.locale can be '', but we need a real locale code to activate
# otherwise the request uses the previously handled request's
# translations.
translation.activate(prefixer.locale or settings.LANGUAGE_CODE)

def process_response(self, request, response):
"""Unset the thread-local var we set during `process_request`."""
Expand Down

0 comments on commit 67bb93d

Please sign in to comment.