Skip to content

Code to guide user to create their custom usermodel #331

@jonathan-s

Description

@jonathan-s

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions