By default emails are not unique in Django.
There are several approaches you can use:
1. In your login view use email to fetch user and then call authenticate
for username. For signup you can use any garbage username!
2. Write custom user model (Just extend User model and change
USERNAME_FIELD to email)
3. Write custom user model with no username field. Write an authentication
backed also to use email for authentication
4. Use django dev version (They have upgraded username char limit to 254).

On Wed, 4 Nov 2015 at 14:06 Patrick Breitenbach <[email protected]>
wrote:

> Is there a current "best" approach or module for signup/login with an
> email address?
>
> <rant>I can't believe this is not included with django. In fact, it should
> be the default. 80-99% of services and projects do not use usernames.</rant>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1bc440aa-6afb-48e1-bb1e-1ab937cb328c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1bc440aa-6afb-48e1-bb1e-1ab937cb328c%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 users" 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAByqUgh%2BAPLvuKTA3ZEk_3p2pfkhRpO1HO7feKkKSZGJ9d4m9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to