Accepting email address as username in Django

后端 未结 12 2052
感动是毒
感动是毒 2020-11-28 19:48

Is there a good way to do this in django without rolling my own authentication system? I want the username to be the user\'s email address instead of them creating a userna

12条回答
  •  再見小時候
    2020-11-28 20:32

    Django now provides a full example of an extended authentication system with admin and form: https://docs.djangoproject.com/en/stable/topics/auth/customizing/#a-full-example

    You can basically copy/paste it and adapt (I didn't need the date_of_birth in my case).

    It is actually available since Django 1.5 and is still available as of now (django 1.7).

提交回复
热议问题