Search code examples
djangodjango-registration

How to use different form in Django-Registration


Django-Registration has several form classes in the forms.py file. One is "class RegistrationFormTermsOfService(RegistrationForm) ..

What do I change in the rest of Django Registration code to enable this form in my registration flow instead of RegistrationForm?


Solution

  • You can simply go into your urls.py and override the form class by doing something like:

    from registration.forms import RegistrationFormTermsOfService
    
    (r'^accounts/register/$', 'registration.views.register', {'form_class' : RegistrationFormTermsOfService}),