summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@rd.io>2012-09-07 15:33:02 -0400
committerAlex Gaynor <alex.gaynor@rd.io>2012-09-07 15:33:02 -0400
commitad50243cd143906d573b11397fa0fd080c9cd7f1 (patch)
treecae7522e7f6a9b912565d3cee3d1350f3b81e3f8 /django
parent335a9f9cf1e2f40679e91cf42cfd0e636885a397 (diff)
[py3k] Fixed the index creation code that I committed a few minutes ago for py3k.
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/creation.py3
1 files changed, 2 insertions, 1 deletions
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()):