You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def generate_username(self, form):
# do something to generate a unique username (required by the
# Django User model, unfortunately)
username = "<magic>"
return username
But it's not a fact of life that the django user model requires username. I think it could be a good idea to include a sane abstractuser that is without the username.
In the documentation it says
But it's not a fact of life that the django user model requires username. I think it could be a good idea to include a sane
abstractuser
that is without the username.An post that basically details the code for this is this one -> https://www.caktusgroup.com/blog/2013/08/07/migrating-custom-user-model-django/
There they include first name and last name. Which might be slightly contentious. See -> https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
If the model doesn't require a username, no username should need to be generated.
The text was updated successfully, but these errors were encountered: