21.6.5 Resending Activation
If a user creates an account but then forgets to click the activation link in his or her email until after the number of days set in the PASSWORD_RESET_TIMEOUT_DAYS setting, the user will be unable to activate the account. The user’s email is already in our database, and so creating another account is out of the question. Instead, we need the user to be able to request another activation email.
To start, we create the ResendActivationEmailForm. Like the UserCreationForm, it uses the ActivationMailFormMixin to send the User an email. However, unlike the UserCreationForm, we won’t be creating an account.
We start by importing our logging tools and Django’s form package, as shown in Example 21.82.
Example 21.82: Project ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access