问题
I am using django-inspectional-registration
which is based on the official django-registration
.
I would like to ensure the uniqueness of the User's email field but I while I am using:
url(r'^register/$', RegistrationView.as_view(), {'form_class' : RegistrationFormUniqueEmail},
name='registration_register'),
as suggested, a new registration with the same email always pass the verification.
Any suggestions?
回答1:
Try passing the form class as an argument to as_view
url(r'^register/$', RegistrationView.as_view(form_class=RegistrationFormUniqueEmail),
name='registration_register')
来源:https://stackoverflow.com/questions/15174028/registration-form-unique-email