Reputation: 943
I created an app where I used to require an email
and a username
for signup.
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.
I was thinking that I could just set the max_length
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?
Upvotes: 0
Views: 57
Reputation: 182
You probably need to change the authentication backend and then change your models. More information can be found on the django documentation website:
https://docs.djangoproject.com/en/1.10/topics/auth/customizing/
Upvotes: 4