diff options
author | pjrharley <devnull@localhost> | 2009-05-23 21:13:53 +0100 |
---|---|---|
committer | pjrharley <devnull@localhost> | 2009-05-23 21:13:53 +0100 |
commit | 14b39d906c74bd491f2cb2ff13338efe7f190d8a (patch) | |
tree | 15f29c48e7bcf602f24edcd277e44f1ecd5287c9 /registration/models.py | |
parent | 0508ba299c4f26ce6cbabd58af5692e04fa04d49 (diff) | |
download | troggle-14b39d906c74bd491f2cb2ff13338efe7f190d8a.tar.gz troggle-14b39d906c74bd491f2cb2ff13338efe7f190d8a.tar.bz2 troggle-14b39d906c74bd491f2cb2ff13338efe7f190d8a.zip |
[svn] Use the django compatability thing - webserver might have old python on it....
Diffstat (limited to 'registration/models.py')
-rw-r--r-- | registration/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/registration/models.py b/registration/models.py index 3a28095..cf0561b 100644 --- a/registration/models.py +++ b/registration/models.py @@ -1,7 +1,7 @@ import datetime import random import re -import hashlib +from django.utils.hashcompat import sha_constructor from django.conf import settings from django.contrib.auth.models import User @@ -152,8 +152,8 @@ class RegistrationManager(models.Manager): username and a random salt. """ - salt = hashlib.sha1(str(random.random())).hexdigest()[:5] - activation_key = hashlib.sha1(salt+user.username).hexdigest() + salt = sha_constructor(str(random.random())).hexdigest()[:5] + activation_key = sha_constructor(salt+user.username).hexdigest() return self.create(user=user, activation_key=activation_key) |