Code cleanup some small changes in the formatting.

This commit is contained in:
2017-11-03 07:49:21 +01:00
parent 002eb40ea5
commit 34d327f183
5 changed files with 31 additions and 21 deletions

View File

@@ -56,8 +56,8 @@ class ActivationManager(models.Manager):
"""Creates a PendingActivation instance with an random activation key.
@param user: the user that requests activation.
"""
salt = str(user.pk * random.random()) + \
user.registration_date.isoformat()
salt = str(user.pk * random.random())
salt += user.registration_date.isoformat()
activation_key = hashlib.sha1(salt.encode()).hexdigest()
return self.create(user=user, activation_key=activation_key)