November 2015
Beginner to intermediate
840 pages
26h 30m
English
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.
Example 21.59: Project Code
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.
Example 21.60: Project Code
73 url(
Read now
Unlock full access