summaryrefslogtreecommitdiff
path: root/django/http/__init__.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-08-29 22:40:51 +0200
committerClaude Paroz <claude@2xlibre.net>2012-08-30 15:46:16 +0200
commitae88e73fa630694a152b54df68d53ce535312e45 (patch)
treee1eda66e1ccb36c9b66504d565a2cfcb856ed926 /django/http/__init__.py
parent36df198e4b2f03102389e6e8aa08365c0d0bd974 (diff)
Replaced some smart_xxx by force_xxx equivalent
smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
Diffstat (limited to 'django/http/__init__.py')
-rw-r--r--django/http/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index b458fe6c2e..2198f38cbb 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -61,14 +61,14 @@ else:
if not _cookie_allows_colon_in_names:
def load(self, rawdata):
self.bad_cookies = set()
- super(SimpleCookie, self).load(smart_str(rawdata))
+ super(SimpleCookie, self).load(force_str(rawdata))
for key in self.bad_cookies:
del self[key]
# override private __set() method:
# (needed for using our Morsel, and for laxness with CookieError
def _BaseCookie__set(self, key, real_value, coded_value):
- key = smart_str(key)
+ key = force_str(key)
try:
M = self.get(key, Morsel())
M.set(key, real_value, coded_value)
@@ -85,7 +85,7 @@ from django.core.files import uploadhandler
from django.http.multipartparser import MultiPartParser
from django.http.utils import *
from django.utils.datastructures import MultiValueDict, ImmutableList
-from django.utils.encoding import force_bytes, force_text, smart_str, iri_to_uri
+from django.utils.encoding import force_bytes, force_str, force_text, iri_to_uri
from django.utils.http import cookie_date
from django.utils import six
from django.utils import timezone
@@ -137,7 +137,7 @@ def build_request_repr(request, path_override=None, GET_override=None,
except Exception:
meta = '<could not parse>'
path = path_override if path_override is not None else request.path
- return smart_str('<%s\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' %
+ return force_str('<%s\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' %
(request.__class__.__name__,
path,
six.text_type(get),