Now that we have our
UserCreationForm, we can build the views to create and activate new users. To begin, we can create the
CreateAccount view, starting in the
user/urls.py file. We first import the necessary tools and views, as shown in Example 21.59.
7 from django.views.generic import ( 8 RedirectView, TemplateView) 9 10 from .views import ( 11 ActivateAccount, CreateAccount, 12 DisableAccount)
We can then create a very simple URL pattern for
CreateAccount, as shown in Example 21.60.