Skip to content

Commit

Permalink
Refs #27795 -- Removed force_bytes() usage in django/template/loaders…
Browse files Browse the repository at this point in the history
…/cached.py.
  • Loading branch information
jdufresne authored and timgraham committed Feb 10, 2018
1 parent 968329b commit 1f3852b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/template/loaders/cached.py
Expand Up @@ -7,7 +7,6 @@

from django.template import TemplateDoesNotExist
from django.template.backends.django import copy_exception
from django.utils.encoding import force_bytes

from .base import Loader as BaseLoader

Expand Down Expand Up @@ -88,7 +87,7 @@ def cache_key(self, template_name, skip=None):
return '-'.join(s for s in (str(template_name), skip_prefix, dirs_prefix) if s)

def generate_hash(self, values):
return hashlib.sha1(force_bytes('|'.join(values))).hexdigest()
return hashlib.sha1('|'.join(values).encode()).hexdigest()

def reset(self):
"Empty the template cache."
Expand Down

0 comments on commit 1f3852b

Please sign in to comment.