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.