mirror of
https://github.com/django/django.git
synced 2025-10-28 18:43:19 +00:00
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d5dbeaa9be
commit
f69cf70ed8
366 changed files with 17833 additions and 11199 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from django.utils import httpwrappers
|
||||
from django import http
|
||||
from django.utils.translation import check_for_language, activate, to_locale, get_language
|
||||
from django.utils.text import javascript_quote
|
||||
from django.conf import settings
|
||||
|
|
@ -17,7 +17,7 @@ def set_language(request):
|
|||
next = request.META.get('HTTP_REFERER', None)
|
||||
if not next:
|
||||
next = '/'
|
||||
response = httpwrappers.HttpResponseRedirect(next)
|
||||
response = http.HttpResponseRedirect(next)
|
||||
if check_for_language(lang_code):
|
||||
if hasattr(request, 'session'):
|
||||
request.session['django_language'] = lang_code
|
||||
|
|
@ -190,5 +190,5 @@ def javascript_catalog(request, domain='djangojs', packages=None):
|
|||
src.append(LibFoot)
|
||||
src.append(InterPolate)
|
||||
src = ''.join(src)
|
||||
return httpwrappers.HttpResponse(src, 'text/javascript')
|
||||
return http.HttpResponse(src, 'text/javascript')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue