Answer the question
In order to leave comments, you need to log in
How to create two kinds of users in a Django site?
I have a Django site, and a custom User model inherited from AbstractUser , but I need to make two types of users, a seller and a buyer. The buyer has nothing but to select a product and add to favorites, but the seller has the city where he lives, the product he sells, the type of product. How to create two different users on the site during registration and how to store it in the database
Answer the question
In order to leave comments, you need to log in
You can simply create two groups: seller and buyer. When registering, add the user to the appropriate group. Create/assign groups the permissions you want or use django-rules. Whether in views to check there are the necessary permissions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question