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']
return super().save(commit=commit)
class EmailAuthenticateForm(UserCreationForm):
username = User._meta.get_field('username').formfield(label='Email')
On Fri, May 4, 2018 at 7:20 AM, Ali A Cetrefli <[email protected]>
wrote:
> 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 Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/c31d4b3d-c71f-4f0b-b3c4-
> 5be1e8e7d34b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/c31d4b3d-c71f-4f0b-b3c4-5be1e8e7d34b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CAFO84S7c%3DKBE_xxgaqtUDGgc8cJK8_C5iBE6RCUkyqA%2Bjp%3DPCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.