Can I force users to make unique e-mail addresses in django-registration?
It should suffice to create your registration form from your user model. If the e-mail address is defined to be unique there, the form will output an error on submit for duplicate addresses.
Look here for details.
As Dominic points out, you'll not be able to do this with the built-in user profile. You'll have to extend it by creating your own user profile as described here and make it contain a unique e-mail address.
django-registration has several forms included in the source – one is a RegistrationFormUniqueEmail
, which might help you ...
P.S. You can adjust the form to use by changing the default backend or by implementing a custom one, where you return the appropriate form class, see: http://bitbucket.org/ubernostrum/django-registration/src/073835a4269f/registration/backends/default/init.py#cl-118
forms.py
from registration.forms import RegistrationFormUniqueEmail
class RegistroPerfilForm(RegistrationFormUniqueEmail):
first_name= forms.CharField(required=True)
last_name= forms.CharField(required=True)
kind__of_user= forms.CharField(widget=forms.RadioSelect(choices=TIPO))