0

I'm new for Django.

In my project I need to have two different user type:

  • User_type_1: with some custom fields;
  • User_type_2: with some custom fields (different from User_type_1);

User_type_1 and User_type_2 have some common fields (username, password, ...) I would like to maintain the Django Standard user like Type_1 and Type_2 father type. I would like to get something like this:

Django Standard User (name, username, password...)
|
|_ User_type_1 (type_1 custom field 1,....custom field N)
|_ User_type_2 (type_2 custom field 1,....custom field N)

So, in User_type_1 I would to found also name, username, password which were inherited from father.

In the next step I would like to use to authentication using python_social_auth for ONLY by Facebook for only User_type_1. User_type_2 may continue to login by username / password (using Django classic method for User).

Is possible to know the best practice to do this?

Is possible to find some examples / tutorials for my case (different user types)

Safari
  • 11,437
  • 24
  • 91
  • 191
  • possible duplicate of [Implementing multiple user types with Django 1.5](http://stackoverflow.com/questions/13700030/implementing-multiple-user-types-with-django-1-5) – inejc Mar 09 '15 at 20:06
  • Try to create two models where they have one-to-one relationship to User – DAKZH Mar 09 '15 at 20:16
  • possible duplicate of [Django Multiple Authentication Backend for one project, HOW?](http://stackoverflow.com/questions/17064443/django-multiple-authentication-backend-for-one-project-how) – Chris Belyeu Mar 09 '15 at 20:18
  • I have open-sourced my custom user app, that supports multi user types. Check it out https://github.com/mishbahr/django-users2. – mishbah Mar 10 '15 at 00:28

0 Answers0