I know that Django has class-based generic views which give us ability to (for instance signup) signup users, but it has a little option and I want to add more fields to it, How can I do it? Thanks;
In the views.py
from django.views.generic import CreateView
from django.contrib.auth.forms import UserCreationForm
from django.core.urlresolvers import reverse_lazy
class SignUpView(CreateView):
form_class = UserCreationForm
template_name = "profiles/signup.html"
success_url = reverse_lazy('profiles_home')
In the urls.py
urlpatterns = patterns('profiles.views',
url(r'^signup', SignUpView.as_view(), name="profiles_signup"),
)
I want to add E-mail, First and Last name, ... fields.