Kaydet (Commit) 28e42453 authored tarafından Claude Paroz's avatar Claude Paroz

Removed unneeded smart_str in cache utils.

üst a535040b
...@@ -23,7 +23,7 @@ import time ...@@ -23,7 +23,7 @@ import time
from django.conf import settings from django.conf import settings
from django.core.cache import get_cache from django.core.cache import get_cache
from django.utils.encoding import smart_str, iri_to_uri, force_unicode from django.utils.encoding import iri_to_uri, force_unicode
from django.utils.http import http_date from django.utils.http import http_date
from django.utils.timezone import get_current_timezone_name from django.utils.timezone import get_current_timezone_name
from django.utils.translation import get_language from django.utils.translation import get_language
...@@ -53,7 +53,7 @@ def patch_cache_control(response, **kwargs): ...@@ -53,7 +53,7 @@ def patch_cache_control(response, **kwargs):
if t[1] is True: if t[1] is True:
return t[0] return t[0]
else: else:
return t[0] + '=' + smart_str(t[1]) return '%s=%s' % (t[0], t[1])
if response.has_header('Cache-Control'): if response.has_header('Cache-Control'):
cc = cc_delim_re.split(response['Cache-Control']) cc = cc_delim_re.split(response['Cache-Control'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment