aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/forms.py')
-rw-r--r--debug_toolbar/forms.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/debug_toolbar/forms.py b/debug_toolbar/forms.py
index 60d339c..cc05f30 100644
--- a/debug_toolbar/forms.py
+++ b/debug_toolbar/forms.py
@@ -6,7 +6,7 @@ import hashlib
from django import forms
from django.conf import settings
from django.db import connections
-from django.utils.encoding import smart_bytes
+from django.utils.encoding import force_text
from django.utils.functional import cached_property
from django.core.exceptions import ValidationError
@@ -76,8 +76,8 @@ class SQLSelectForm(forms.Form):
return reformat_sql(self.cursor.db.ops.last_executed_query(self.cursor, sql, params))
def make_hash(self, data):
- params = settings.SECRET_KEY + data['sql'] + data['params']
- return hashlib.sha1(smart_bytes(params)).hexdigest()
+ params = force_text(settings.SECRET_KEY) + data['sql'] + data['params']
+ return hashlib.sha1(params.encode('utf-8')).hexdigest()
@property
def connection(self):