"""Token generator for user registration
"""
# Django Library
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six


class TokenGenerator(PasswordResetTokenGenerator):
    """This class generates a token that is sent in the mail to validate the
    user registration
    """
    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()

PASSWORD_RECOVERY_TOKEN = TokenGenerator()

"""Token generator for user registration
"""
# Django Library
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six


class TokenGenerator(PasswordResetTokenGenerator):
    """This class generates a token that is sent in the mail to validate the
    user registration
    """
    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()

PASSWORD_RECOVERY_TOKEN = TokenGenerator()

Token generator for user registration # Django Library This class generates a token that is sent in the mail to validate the     user registration