summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-09-15 19:55:48 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-09-15 19:55:48 +0000
commitbb94a48f884e1f18c376c3fd518582a8b7ba0dba (patch)
treefa682a273e19c5e3594c596570a9775f8326163b
parentbcfaa7351455e76047604c737d9b3f3ae97fb736 (diff)
Changed set_language() redirect view to check POST data for 'next'. Thanks, msaelices
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/views/i18n.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/views/i18n.py b/django/views/i18n.py
index 5b50f75d23..e2459cf957 100644
--- a/django/views/i18n.py
+++ b/django/views/i18n.py
@@ -16,7 +16,9 @@ def set_language(request):
redirect to the page in the request (the 'next' parameter) without changing
any state.
"""
- next = request.GET.get('next', None)
+ next = request.POST.get('next', None)
+ if not next:
+ next = request.GET.get('next', None)
if not next:
next = request.META.get('HTTP_REFERER', None)
if not next: