mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Refs #27795 -- Removed force_bytes() usage in django/template/loaders/cached.py.
This commit is contained in:
parent
968329b5c2
commit
1f3852b708
@ -7,7 +7,6 @@ import hashlib
|
||||
|
||||
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
|
||||
|
||||
@ -88,7 +87,7 @@ class Loader(BaseLoader):
|
||||
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."
|
||||
|
Loading…
Reference in New Issue
Block a user