Multiple User Types | Django

Daniel Roy Greenfeld · 60K views · 2020 · 21:13

Open on YouTube

Web developmentPython, Ruby & scripting languagestutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering how to model several kinds of users in Django, since it walks through the proxy model approach.

Recommended by 2 people across 2 different months, 2021 to 2023.

What it is

A 21-minute coding screencast by Daniel Roy Greenfeld (pydanny) showing how to support multiple user types in Django in a maintainable way, using proxy models. It includes a short appearance by Audrey Feldroy and links to the source code and Django proxy model docs.

What people said

Recommends lhoupert · 2021-06 · Stack Overflow · on “How to implement Django multiple user types, while one user can have different role according to the project he/she is working on?”

I couldn't find a solution to my problem and would appreciate comments/help on this. I would like to develop a multiple user type model in Django, along the lines of this video [this video] where the author is using Django Proxy Models [LINK] . Situation I have a list of XX projects ( proj01 , proj02 , projXX , ...). All these projects have their specific page that can be accessed through a specific url mysite/projXX/ I have multiple users: Adam, Bob, Caroline, Dany, Ed, ... Each user can have several roles according to the project they are working on (e.g. manager, developer, documentarist, reviewer, editor, ...) A user can have a different role according to the project. E.g. Adam can be reviewe

Recommends Tanveer · 2023-02 · Stack Overflow · on “Multiple Authentication Models in Django”

if you have multiple types of User then I think so you have to use Proxy model it will easy to use and understandable you can learn about from here [this video]

Cites Aman · 2021-01 · Stack Overflow · on “how to update seller profile in django?”

I redesign models.py, forms.py file below:- models.py # Profile models have all field (contains Buyers and Sellers) class Profile(models.Model): CATEGORY_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) user = models.OneToOneField(User, on_delete=models.CASCADE) # is_seller field divide the user from Seller and Buyer is_seller = models.BooleanField(default=False) # if 'is_seller' field false then it means user is 'buyer' and vice-versa profile_image = models.ImageField(upload_to='photos/', blank=True, null=True) date_of_birth = models.DateField() gender = models.CharField(max_length=200, choices=CATEGORY_CHOICES, blank=True, null=True) phone = models.CharField(max_length=200, blank=True, null=T