--- a/server/python/django/renkanmanager/utils.py Thu Sep 25 12:16:00 2014 +0200
+++ b/server/python/django/renkanmanager/utils.py Mon Nov 10 11:33:03 2014 +0100
@@ -11,7 +11,7 @@
from django.utils.encoding import smart_str
from renkanmanager.models import Renkan
import math
-import md5
+import hashlib
import re
import uuid
@@ -23,7 +23,7 @@
cache_key = re.sub(r'\s+', '-', key)
cache_key = smart_str(cache_key)
if len(cache_key) > (250-(2+len(cache.key_prefix)+len(str(cache.version)))-33):
- cache_key = cache_key[:(250-(2+len(cache.key_prefix)+len(str(cache.version)))-33)] + '-' + md5.new(cache_key).hexdigest()
+ cache_key = cache_key[:(250-(2+len(cache.key_prefix)+len(str(cache.version)))-33)] + '-' + hashlib.md5(cache_key).hexdigest()
return cache_key