0

For my needs builtin model User is not enough... So I have my own model UserProfile and I want make authentication on site through this model (UserProfile does not inherit from User model and not related to it at all).

But builtin authentication uses model User.

So I want to understand how can I change that, so authentication use my model UserProfile with all auth features???

Thanks in advance!!!

1 Answer 1

2

You have to create your own Authentication Backend to tell Django to create a UserProfile instead a User.

In this examples, the user model is extended so you will have to adapt it to your own requirements:

Example 1

Example 2

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.