Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code to guide user to create their custom usermodel #331

Open
jonathan-s opened this issue Jun 4, 2020 · 0 comments
Open

Code to guide user to create their custom usermodel #331

jonathan-s opened this issue Jun 4, 2020 · 0 comments

Comments

@jonathan-s
Copy link
Contributor

In the documentation it says

    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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant