On 14/02/2020 7:32 pm, Carsten Fuchs wrote:
Am 14.02.20 um 09:03 schrieb Mike Dewhirst:
Definitely start a new project with a custom user and I would consider aborting 
an existing project to restart with a custom user if it was started with the 
standard user.
Which may not be possible for large, existing projects.

Switching to a custom user model in mid-project is possible. Based on the work 
of other's, I've tried to summarize the required steps, see 
https://code.djangoproject.com/ticket/25313#comment:18 for details.

For new projects, consider 
https://django-improved-user.readthedocs.io/en/latest/ (rationale: 
https://django-improved-user.readthedocs.io/en/latest/rationale.html )

Best regards
Carsten


Well documented Carsten!!! Many thanks. Also, I really liked django-improved-user and was able (having endured the retro-fitting pain) to adjust last_name/first_name to full_name/short_name. That was an immediate payoff.

In your documentation you mention "from accounts.models import User"

I have been maybe taking things too literally. After migrating to my custom user I have used "from django.contrib.auth import get_user_model" followed by "User = get_user_model"

I much prefer your direct route. Is it correct?

Thanks

Mike


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3a78b205-ca7e-75f4-f78c-94c46e61bf06%40dewhirst.com.au.

Reply via email to