diff options
| author | Aymeric Augustin | 2013-10-16 23:08:03 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2013-10-17 18:24:58 +0200 |
| commit | edd871bd37833fff7c5964896299999ce6da8e1c (patch) | |
| tree | a8ecf277f5e07a45cdff4327d8405ab9f77e8966 /debug_toolbar/forms.py | |
| parent | 23c44d8c5cf560cc8cb304d8753e8b658d1fe70d (diff) | |
| download | django-debug-toolbar-edd871bd37833fff7c5964896299999ce6da8e1c.tar.bz2 | |
Switch from str & unicode to bytes & text.
Diffstat (limited to 'debug_toolbar/forms.py')
| -rw-r--r-- | debug_toolbar/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/debug_toolbar/forms.py b/debug_toolbar/forms.py index aad308a..60d339c 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_str +from django.utils.encoding import smart_bytes from django.utils.functional import cached_property from django.core.exceptions import ValidationError @@ -77,7 +77,7 @@ class SQLSelectForm(forms.Form): def make_hash(self, data): params = settings.SECRET_KEY + data['sql'] + data['params'] - return hashlib.sha1(smart_str(params)).hexdigest() + return hashlib.sha1(smart_bytes(params)).hexdigest() @property def connection(self): |
