mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
377 B
13 lines
377 B
from django.contrib.auth.tokens import PasswordResetTokenGenerator
|
|
from django.utils import six
|
|
|
|
|
|
class TokenGenerator(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 = TokenGenerator()
|