mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-21 07:18:22 +02:00
Fully test registration app
This commit is contained in:
@ -60,6 +60,7 @@ INSTALLED_APPS = [
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
|
||||
'api',
|
||||
'eastereggs',
|
||||
'registration',
|
||||
'participation',
|
||||
|
@ -20,7 +20,8 @@ class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
|
||||
# Truncate microseconds so that tokens are consistent even if the
|
||||
# database doesn't support microseconds.
|
||||
login_timestamp = '' if user.last_login is None else user.last_login.replace(microsecond=0, tzinfo=None)
|
||||
return str(user.pk) + str(user.email) + str(login_timestamp) + str(timestamp)
|
||||
return str(user.pk) + str(user.email) + str(user.registration.email_confirmed)\
|
||||
+ str(login_timestamp) + str(timestamp)
|
||||
|
||||
|
||||
email_validation_token = AccountActivationTokenGenerator()
|
||||
|
Reference in New Issue
Block a user