mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
[py3k] Fixed the index creation code that I committed a few minutes ago for py3k.
This commit is contained in:
parent
335a9f9cf1
commit
ad50243cd1
@ -4,6 +4,7 @@ import time
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.utils import load_backend
|
from django.db.utils import load_backend
|
||||||
|
from django.utils.encoding import force_bytes
|
||||||
from django.utils.six.moves import input
|
from django.utils.six.moves import input
|
||||||
|
|
||||||
# The prefix to put on the default database name when creating
|
# The prefix to put on the default database name when creating
|
||||||
@ -30,7 +31,7 @@ class BaseDatabaseCreation(object):
|
|||||||
"""
|
"""
|
||||||
h = hashlib.md5()
|
h = hashlib.md5()
|
||||||
for arg in args:
|
for arg in args:
|
||||||
h.update(arg)
|
h.update(force_bytes(arg))
|
||||||
return h.hexdigest()[:8]
|
return h.hexdigest()[:8]
|
||||||
|
|
||||||
def sql_create_model(self, model, style, known_models=set()):
|
def sql_create_model(self, model, style, known_models=set()):
|
||||||
|
Loading…
Reference in New Issue
Block a user