mirror of
https://github.com/django/django.git
synced 2025-10-28 18:43:19 +00:00
Fixed #5603 -- Allow customization of the language cookie name. Thanks, moe.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2dbb08e5dc
commit
efed04b634
5 changed files with 18 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ def set_language(request):
|
|||
if hasattr(request, 'session'):
|
||||
request.session['django_language'] = lang_code
|
||||
else:
|
||||
response.set_cookie('django_language', lang_code)
|
||||
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang_code)
|
||||
return response
|
||||
|
||||
NullSource = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue