Eine Menge Aufräumarbeiten.
* Eine Testsuite um Mahrjong Ranking Berechnungen zu testen * Erste Arbeiten um die Workarounds aus dem "utils" Paket los zu werden. * Vieles am Code umformatiert für PEP8 conformität
This commit is contained in:
@@ -65,8 +65,9 @@ class ActivationManager(models.Manager):
|
||||
creates a PendingActivation instance with an random activation key.
|
||||
@param user: the user that requests activation.
|
||||
"""
|
||||
salt = str(random.random())
|
||||
activation_key = hashlib.sha1(salt + user.username).hexdigest()
|
||||
salt = str(user.pk * random.random()) + \
|
||||
user.registration_date.isoformat()
|
||||
activation_key = hashlib.sha1(salt.encode('utf-8')).hexdigest()
|
||||
|
||||
return self.create(user=user, activation_key=activation_key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user