From ad50243cd143906d573b11397fa0fd080c9cd7f1 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 7 Sep 2012 15:33:02 -0400 Subject: [PATCH] [py3k] Fixed the index creation code that I committed a few minutes ago for py3k. --- django/db/backends/creation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py index 659d35ace3..52d5ac0547 100644 --- a/django/db/backends/creation.py +++ b/django/db/backends/creation.py @@ -4,6 +4,7 @@ import time from django.conf import settings from django.db.utils import load_backend +from django.utils.encoding import force_bytes from django.utils.six.moves import input # The prefix to put on the default database name when creating @@ -30,7 +31,7 @@ class BaseDatabaseCreation(object): """ h = hashlib.md5() for arg in args: - h.update(arg) + h.update(force_bytes(arg)) return h.hexdigest()[:8] def sql_create_model(self, model, style, known_models=set()):