email confirmation for new user registration - still need coach
This commit is contained in:
12
rowers/tokens.py
Normal file
12
rowers/tokens.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.contrib.auth.tokens import PasswordResetTokenGenerator
|
||||
from django.utils import six
|
||||
|
||||
|
||||
class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
|
||||
def _make_hash_value(self, user, timestamp):
|
||||
return (
|
||||
six.text_type(user.pk) + six.text_type(timestamp) +
|
||||
six.text_type(user.is_active)
|
||||
)
|
||||
|
||||
account_activation_token = AccountActivationTokenGenerator()
|
||||
Reference in New Issue
Block a user