O'Reilly logo

Django Unleashed by Andrew Pinkham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required