diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-01-26 14:25:15 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-26 19:49:03 +0100 |
| commit | fee42fd99ee470528858c2ccb3621135c30ec262 (patch) | |
| tree | b7d0905a11f28a0b554d39b30e0286dca2a07cc1 /django/core/cache | |
| parent | af598187ecd9ddf398aa7a68a2b955599ddf3ae1 (diff) | |
Refs #23919 -- Replaced usage of django.utils.http utilities with Python equivalents
Thanks Tim Graham for the review.
Diffstat (limited to 'django/core/cache')
| -rw-r--r-- | django/core/cache/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/cache/utils.py b/django/core/cache/utils.py index 84676b9237..e9e144275f 100644 --- a/django/core/cache/utils.py +++ b/django/core/cache/utils.py @@ -1,7 +1,7 @@ import hashlib +from urllib.parse import quote from django.utils.encoding import force_bytes -from django.utils.http import urlquote TEMPLATE_FRAGMENT_KEY_TEMPLATE = 'template.cache.%s.%s' @@ -9,6 +9,6 @@ TEMPLATE_FRAGMENT_KEY_TEMPLATE = 'template.cache.%s.%s' def make_template_fragment_key(fragment_name, vary_on=None): if vary_on is None: vary_on = () - key = ':'.join(urlquote(var) for var in vary_on) + key = ':'.join(quote(str(var)) for var in vary_on) args = hashlib.md5(force_bytes(key)) return TEMPLATE_FRAGMENT_KEY_TEMPLATE % (fragment_name, args.hexdigest()) |
