Dear Ali,
First, Collin's code works if you just want a workaround to the default
authentication class. However, if you mean having User Authentication with
email as the primary attribute, then you have to override the default
authentication/user object. Django currently allows custom user mo
Do you want something like this?
class EmailUserCreationForm(UserCreationForm):
username = User._meta.get_field('username').formfield(label='Email',
validators=[validators.validate_email])
def save(self, commit=True):
self.instance.email = self.cleaned_data['username']
ret
Dear developers,
Please make new email UserCreateFormbyEmail, UserAuthenticatebyEmail
I know, You have many custom authentication methods, but nature of internet
in signup forms is by email not username..
best regards..
--
You received this message because you are subscribed to the Google Gro