Registration Form Unique Email

隐身守侯 提交于 2020-01-11 09:49:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!