diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 35e102065d..46c8c7971c 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -63,7 +63,7 @@ class WSGIRequest(http.HttpRequest): pformat(self.META)) def get_full_path(self): - return '%s%s' % (self.path, self.environ['QUERY_STRING'] and ('?' + self.environ['QUERY_STRING']) or '') + return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '') def _load_post_and_files(self): # Populates self._post and self._files