Hi Patrick, I used emails "as usernames" many times in my projects. You can use django-authtools (https://github.com/fusionbox/django-authtools), it has an AbstractEmailUser (https://django-authtools.readthedocs.org/en/latest/intro.html#authtools.models.AbstractEmailUser). You can set your own custom User model, which inherits from AbstractEmailUser, and you will already have an Email authenticated user ready to roll :)
PD: I'm not related anyhow to the app, I just have found it very useful. Cheers, Chesco Igual. On Wednesday, November 4, 2015 at 10:50:34 AM UTC+1, Dheerendra Rathor wrote: > > 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] > <javascript:>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/d7ed8f41-1fe8-479a-8048-0dfc3590a84e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

