Users and Clients Models

Hello There,
I Have a Question if anyone has idea i can follow,

I need to make users to manage the website and also clients to buy from website
i made the CustomUser model but the point here what is the right way :

  • create one app for users with two models one for class Users and one for class Clients with OneToOneField.
  • create different app for class Clients.

and about Authentication and ModelManager(), does it need to be only one Model Manager for both Users and Clients.

Thanks in Advance.

You only need one User - and it doesn’t even need to be a custom model.

The User model is used to authenticate people - identifying who they are.

The Permissions system exists to authorize people - identify what they can do.

You only want one user model, you want to assign each of the types of users different permissions. (Or, more appropriately, you want to assign people to “Roles”, represented within Django as Groups.)

1 Like