mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
i18n: LANGUAGE_CODE in DjangoContext is now language-SUBLANGUAGE instead of language_SUBLANGUAGE (was introduced by [848])
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
176c4545f6
commit
18d0c31d51
@ -37,9 +37,9 @@ class DjangoContext(Context):
|
||||
from django.conf import settings
|
||||
self['LANGUAGES'] = settings.LANGUAGES
|
||||
if hasattr(request, 'LANGUAGE_CODE'):
|
||||
self['LANGUAGE_CODE'] = request.LANGUAGE_CODE
|
||||
self['LANGUAGE_CODE'] = request.LANGUAGE_CODE.replace('_', '-')
|
||||
else:
|
||||
self['LANGUAGE_CODE'] = settings.LANGUAGE_CODE
|
||||
self['LANGUAGE_CODE'] = settings.LANGUAGE_CODE.replace('_', '-')
|
||||
if DEBUG and request.META.get('REMOTE_ADDR') in INTERNAL_IPS:
|
||||
self['debug'] = True
|
||||
from django.core import db
|
||||
|
Loading…
x
Reference in New Issue
Block a user