1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #16705 - Made the test client adhere to the WSGI spec -- in particular, removed the assumption that environ['QUERY_STRING'] exists.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin
2011-10-06 20:39:15 +00:00
parent 9279dce1fe
commit e2f9c11736
6 changed files with 21 additions and 12 deletions

View File

@@ -140,7 +140,7 @@ class RedirectView(View):
are provided as kwargs to this method.
"""
if self.url:
args = self.request.META["QUERY_STRING"]
args = self.request.META.get('QUERY_STRING', '')
if args and self.query_string:
url = "%s?%s" % (self.url, args)
else: