Reputation: 10936
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!!!
Upvotes: 0
Views: 288
Reputation: 12448
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:
Upvotes: 2