import six
from django.contrib.auth.tokens import PasswordResetTokenGenerator


class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
    """Generate account activation token from user_id and timestamp and email verified integer using six lib"""
    def _make_hash_value(self, user, timestamp):
        return (
            six.text_type(user.pk) + six.text_type(timestamp) +
            six.text_type(user.profile.email_verified)
        )


account_activation_token = AccountActivationTokenGenerator()
import six
from django.contrib.auth.tokens import PasswordResetTokenGenerator


class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
    """Generate account activation token from user_id and timestamp and email verified integer using six lib"""
    def _make_hash_value(self, user, timestamp):
        return (
            six.text_type(user.pk) + six.text_type(timestamp) +
            six.text_type(user.profile.email_verified)
        )


account_activation_token = AccountActivationTokenGenerator()
Generate account activation token from user_id and timestamp and email verified integer using six lib