Django Library Users
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.

123456789
  1. from django.contrib.auth.tokens import PasswordResetTokenGenerator
  2. class AppTokenGenerator(PasswordResetTokenGenerator):
  3. def _make_hash_value(self, user, timestamp):
  4. return f"{user.is_active}{user.pk}{timestamp}"
  5. generate_token = AppTokenGenerator()