bottleneckcrm/backend/common/token_generator.py
Ashwin Kumar c2b29afdf8
1.0 (#567)
1.0
2025-12-06 23:10:54 +05:30

16 lines
449 B
Python

import six
from django.contrib.auth.tokens import PasswordResetTokenGenerator
class TokenGenerator(PasswordResetTokenGenerator):
"""this class is used to generate a unique token to identify the user"""
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()