You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I have read widely (including the docs) and been daunted by the notion
of coverting auth.user into a custom user. I have data and wonder if
there have been any recent recipes for doing this?
Thanks
Mike
Tim Graham
unread,
Aug 7, 2017, 9:55:24 AM8/7/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
OK thanks Tim. I'll start the planning. I'll presume Django 1.10 isn't
sufficiently different from 1.8 for which the instructions are written.
I wish I wasn't an underconfident wuss!
>
> On Friday, August 4, 2017 at 3:37:08 AM UTC-4, Mike Dewhirst wrote:
>
> I have read widely (including the docs) and been daunted by the
> notion
> of coverting auth.user into a custom user. I have data and wonder if
> there have been any recent recipes for doing this?
>
> Thanks
>
> Mike
>
I have read widely (including the docs) and been daunted by the notion of coverting auth.user into a custom user. I have data and wonder if there have been any recent recipes for doing this?
On a related note, I'd recommend implementing a custom user model immediately on every new project, even if you don't intend to change anything on the built-in user immediately. It is as simple as inheriting from django.contrib.auth.models.AbstractUser like this:
class MyUser(AbstractUser):
pass
And then setting AUTH_USER_MODEL to MyUser. At that point, changes to the user model are handled via standard migrations.
Obviously this doesn't help existing projects. You'll still be stuck with the foreign key shell game that is implementing a custom user after the fact.