Email as Username in an existing django app
<p>I created an app where I used to require an <code>email</code> and a <code>username</code> for signup. </p>

<p>Now I would like to change this so that any existing users have their username changed to their email. Any new users will not see the username field upon signup, but in the backend they'd be the same. </p>

<p>I was thinking that I could just set the <code>max_length</code> to the length of email? Then in the backend, I could just set the username to the email when the user signs up. What am I missing here?</p>

<p>You probably need to change the authentication backend and then change your models. More information can be found on the django documentation website: </p>

<p><a href="https://docs.djangoproject.com/en/1.10/topics/auth/customizing/" rel="nofollow">https://docs.djangoproject.com/en/1.10/topics/auth/customizing/</a></p>

python django