1. benmao
  2. sa3album

Commits

ben  committed 7dcf517

精简md5生成函数

  • Participants
  • Parent commits 6369fba
  • Branches default

Comments (0)

Files changed (1)

File models.py

View file
  • Ignore whitespace
 from google.appengine.api import memcache
 
 def get_md5(bf):
-    md5 = hashlib.md5()
-    md5.update(bf)
-    return md5.hexdigest()
+    return hashlib.md5(bf).hexdigest()
 
 class Album(db.Model):
     '''