Michael Elsdörfer  committed 04ab378

Fix Django 1.5 deprecation warning.

  • Participants
  • Parent commits 2499a0c

Comments (0)

Files changed (1)

File registration/

 import datetime
 import random
 import re
+import hashlib
 from django.conf import settings
 from django.contrib.auth.models import User
 from django.db import models
 from django.db import transaction
 from registration.template import render_to_string
-from django.utils.hashcompat import sha_constructor
 from django.utils.translation import ugettext_lazy as _
         of multiple uses of the "password reset" feature, a new profile
         will be created (although the old record is reused).
-        salt = sha_constructor(str(random.random())).hexdigest()[:5]
+        salt = hashlib.sha1(str(random.random())).hexdigest()[:5]
         username = user.username
         if isinstance(username, unicode):
             username = username.encode('utf-8')