summaryrefslogtreecommitdiff
path: root/django/http/request.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-05-03 12:04:08 -0400
committerTim Graham <timograham@gmail.com>2016-05-03 12:04:08 -0400
commitead21a1949e408cf37226049559d0e71e3fdff6d (patch)
treec79b379428fd292a747a3c854d166fe48d2572f6 /django/http/request.py
parentac77c55bc5fc54cd763a7ae426784650a8cc97c9 (diff)
downloaddjango-ead21a1949e408cf37226049559d0e71e3fdff6d.tar.gz
Refs #22897 -- Removed unneeded empty string QueryDict argument.
Diffstat (limited to 'django/http/request.py')
-rw-r--r--django/http/request.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/http/request.py b/django/http/request.py
index 2440b11758..d8f5cd7952 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -267,14 +267,14 @@ class HttpRequest(object):
return self._body
def _mark_post_parse_error(self):
- self._post = QueryDict('')
+ self._post = QueryDict()
self._files = MultiValueDict()
self._post_parse_error = True
def _load_post_and_files(self):
"""Populate self._post and self._files if the content-type is a form type"""
if self.method != 'POST':
- self._post, self._files = QueryDict('', encoding=self._encoding), MultiValueDict()
+ self._post, self._files = QueryDict(encoding=self._encoding), MultiValueDict()
return
if self._read_started and not hasattr(self, '_body'):
self._mark_post_parse_error()
@@ -301,7 +301,7 @@ class HttpRequest(object):
elif self.content_type == 'application/x-www-form-urlencoded':
self._post, self._files = QueryDict(self.body, encoding=self._encoding), MultiValueDict()
else:
- self._post, self._files = QueryDict('', encoding=self._encoding), MultiValueDict()
+ self._post, self._files = QueryDict(encoding=self._encoding), MultiValueDict()
def close(self):
if hasattr(self, '_files'):
@@ -473,7 +473,7 @@ class QueryDict(MultiValueDict):
:arg safe: Used to specify characters which do not require quoting, for
example::
- >>> q = QueryDict('', mutable=True)
+ >>> q = QueryDict(mutable=True)
>>> q['next'] = '/a&b/'
>>> q.urlencode()
'next=%2Fa%26b%2F'